2 Localization
Henry edited this page 2022-05-05 02:09:05 +01:00

If you wish to localize the launcher, simply edit the launcher files.

The launcher uses Java's localization system, which does permit multiple languages. If you only plan to support one language, you can just edit the existing language file.

If you plan on supporting multiple languages, this is untested, but theoretically you can affix the language code after the filename (i.e. Launcher_de.properties or Launcher_fr.properties) and Java should detect the correct one, falling back to the existing file if there is no language file for the user's language.

Times, dates, and other numbers should automatically be localized based on the user's system language.

Encoding

By default, the launcher loads language files using the ISO-8859-1 encoding, which covers only a subset of world languages.

To support other languages, the launcher can now optionally load your resource file as UTF-8. If you wish to do this, you must save the file as "UTF-8 with BOM". The BOM (byte-order mark) is a sequence of bytes at the beginning of the file that the launcher uses to detect that the file is UTF-8 and not ISO-8859-1.

Notepad++ can convert files to this encoding:

Screenshot of notepad++ Encoding menu

If your chosen text editor has a similar option that should also work.