Supported languages

As of June 2013, most of my software will be supporting multi-languages. The PlayStation 2 consoles all support 8 languages:

Supported languages
IDCodeLanguage
0JAJapanese
1ENEnglish
2FRFrench
3SPSpanish
4GEGerman
5ITItalian
6DUDutch
7POPortuguese

There are 4 languages that are also supported by the OSDs of fat PlayStation 2 consoles from the countries where these languages are used in, and in all slimline consoles:

Extended languages
IDLanguage
8Russian
9Korean
10Traditional Chinese
11Simplified Chinese

However, these languages are not going to be supported as their values do not get set into the EE kernel's configuration by the OSD. They are exclusively used by the OSDs of such consoles.

Adding support for the 8 languages

There are a few Customizable files under the "lang" folder:

fonts.txtContains the filenames of the font to use for each language. One file on each line for each language.
labels_XX.txtContains labels. One label per line. This file should be saved in the UTF-8 encoding.
strings_XX.txtContains strings (messages). One string per line. This file should be saved in the UTF-8 encoding.
*.ttfFont files. Only files specified in fonts.txt will be used. If your language needs characters not found in the English script, add a font file that can be loaded by FreeType and update the appropriate line within fonts.txt.

*XX = a two-letter code representing each language. If the file cannot be loaded, the system will use its defaults (English-language resources).

Note: For the string and label files, each line in the file represents one message or label. Do not insert lines anywhere.

Basically, to create a translation, you need to edit both labels_EN.txt and strings_EN.txt. Each line within both files correspond to a message/label for the program. Do NOT insert empty lines!

When you're done with translating the text, remember to save both files in the UTF-8 encoding. Name both files to have the correct language code in their filenames (e.g. for the German translation, you should name your strings and labels files strings_GE.txt and labels_GE.txt respectively). The filenames are case-sensitive.

While editing the strings file, you may find escape codes (A backslash, followed by a letter). These codes affect the formatting of the text. The only supported escape code is the newline (\n). You may freely insert these escape codes to make your translated text more readable.

The program will automatically break long lines, to make messages fit onto the screen.
If the automatic line-breaking causes your messages to look weird, please feel free to use the newline escape character to make things more readable.

Sometimes, you may also find something like "%s" or "%.1f". These tell the program where and how to format certain values, for display. Those who do C programming will probably know how to adjust them (although I don't think that it'll be necessary in most cases). For those who don't know what the syntax is like, please do not adjust them.

For languages that contain characters that cannot be displayed with the English script, you may want to provide your own font file. The file must be supported by the FreeType engine, although I've noticed that compatibility by the FreeType engine is not 100% for all fonts. Some fonts will even cause the FreeType engine to crash on the PlayStation 2, so please test your work before submitting!

To specify a font file to be used with your translation, you need to edit the corresponding line for the language you are translating to within the fonts.txt file. The line you need to edit is the index number of the language you're translating to, within the table above (Index 0 corresponds to the top-most line in the fonts.txt file). The fonts.txt file shall be saved in the ASCII encoding, so please ensure that your font file only ASCII characters in its filename!

All files, including the font file (if applicable), should be placed within the folder named "lang". This folder should exist alongside the main binary of the program.