mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Merge pull request #1367 from chrisgarrity/issue/gui2530-blockwidth-locale
Add function to return the current VM/blocks locale
This commit is contained in:
commit
d4f20522b8
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue