Add function to return the current VM/blocks locale

This commit is contained in:
chrisgarrity 2018-07-18 09:52:55 -04:00
parent bf22cdbf13
commit 4ba7e9373f

View file

@ -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.