Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Adding a New Language

github-actions[bot] edited this page May 30, 2025 · 9 revisions

Creating the JSON File

First, you need to create a file in assets/languages/ called [language-code].json.
The name doesn't really matter, so you can call it whatever you want.

For its data, copy this, and edit it with your translations.

Loading your Language

Now, you need to edit the main text file, assets/languages/languagesList.txt, which just contains the data for your language(s).
To add your language into languagesList.txt, use this format:

Name (Country/Tag):save-tag

So, for example, if you wanted to add German, it would look like:

Deutsch (Deutschland):de

Custom Font Support

If you want to add a custom font to your language, add this field anywhere in your .json:

{
    "customFont": "font"
}

Also, make sure that your font actually exists before doing so.

You can also have your font be shown in the language selection menu.
Wherever your languages is in languagesList.txt, add this extra field:

Deutsch (Deutschland):de:germanFont

Localization Functions

Like most functions, these can be accessed through scripting.

Switching to Another Language

HScript:

Localization.switchLanguage('language-tag');

Lua:

switchLanguage('language-tag');

If that language is already selected, the change will not happen.

Retrieving a Key

HScript:

Localization.get('key', 'language-tag');

Lua:

getLangKey('key', 'language-tag');

If the second parameter is empty, defaults to current language.

For further documentation, check out SimpleLocalization.

Clone this wiki locally