mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -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();
|
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.
|
* Handle a Blockly event for the current editing target.
|
||||||
* @param {!Blockly.Event} e Any Blockly event.
|
* @param {!Blockly.Event} e Any Blockly event.
|
||||||
|
|
Loading…
Reference in a new issue