Merge pull request #1367 from chrisgarrity/issue/gui2530-blockwidth-locale

Add function to return the current VM/blocks locale
This commit is contained in:
chrisgarrity 2018-07-18 10:57:24 -04:00 committed by GitHub
commit d4f20522b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -930,6 +930,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.