Localization
When displaying text such as Hello World, you should instead use a localization token like #menu.helloworld. This will automatically replace the text with the corresponding language set by the user when set on a Label, allowing you to easily support multiple languages.
When displaying text such as Hello World, you should instead use a localization token like #menu.helloworld. This will automatically replace the text with the corresponding language set by the user when set on a Label, allowing you to easily support multiple languages.
Tokens
In UI, any displayed string that begins with a # will be recognized as a token, which means it will look for it's real value in the localization system.
Example
Filename: Localization/en/sandbox.json
{
"menu.helloworld": "Hello World",
"spawnmenu.props": "Models",
"spawnmenu.tools": "Tools"
"spawnmenu.cloud": "sbox.game",
}
Then it's as easy as doing the following:
<label>#spawnmenu.props</label>
Languages
| English Name | API Language Code |
|---|---|
| Arabic | ar |
| Bulgarian | bg |
| Simplified Chinese | zh-cn |
| Traditional Chinese | zh-tw |
| Czech | cs |
| Danish | da |
| Dutch | nl |
| English | en |
| Finnish | fi |
| French | fr |
| German | de |
| Greek | el |
| Hungarian | hu |
| Italian | it |
| Japanese | ja |
| Korean | ko |
| Norwegian | no |
| Pirate | en-pt |
| Polish | pl |
| Portuguese | pt |
| Portuguese-Brazil | pt-br |
| Romanian | ro |
| Russian | ru |
| Spanish-Spain | es |
| Spanish-Latin America | es-419 |
| Swedish | sv |
| Thai | th |
| Turkish | tr |
| Ukrainian | uk |
| Vietnamese | vn |
Referenced API
Canonical API pages mentioned in this guide.
A convenience JSON helper that handles `Sandbox.Resource` types for you.
A simple text label.
No summary available.
A generic text label. Can be made editable.
Context menu being opened. Feel free to add options to it in your handler.
The current project's Localization folder
No summary available.
The world