diff --git a/src/virtual-machine.js b/src/virtual-machine.js index d73d8ce7e..d2e5f929e 100644 --- a/src/virtual-machine.js +++ b/src/virtual-machine.js @@ -927,6 +927,14 @@ class VirtualMachine extends EventEmitter { return this.extensionManager.refreshBlocks(); } + /** + * get the current locale for the VM + * @returns {string} the current locale in the VM + */ + getLocale () { + return formatMessage.setup().locale; + } + /** * Handle a Blockly event for the current editing target. * @param {!Blockly.Event} e Any Blockly event.