mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Add function to return the current VM/blocks locale
This commit is contained in:
parent
bf22cdbf13
commit
4ba7e9373f
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue