Merge pull request #1367 from chrisgarrity/issue/gui2530-blockwidth-locale
Add function to return the current VM/blocks locale
This commit is contained in:
1 file changed
+8
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user