Version 1.9.11 and Later

New XMB translation files are always parsed (but not executed) by PHP using the eval() function. This means the following formatting rules are required:

PHP tags are optional.

No data outside the tags is tolerated because XMB will remove the tags before calling eval().

Whitespace outside the tags is okay because it will be treated as being inside the tags.

Everything in the file must abide by PHP syntax.

To be valid, the translation file must specify its own name using the $devname variable. For example:

$devname = 'French';

This name must not contain any special characters. It is used by developers to identify the translation inside XMB. It does not have to be any particular value. Typically it will be the name of the language written in English, plus any distinguishing information for alternates.

Translation meta data should be sorted to the top of the file. The meta data are descriptive information for the translation, not the information that has been translated. Three new keys should always be included in these meta data: 'charset', 'iso639', and 'language'.

'charset' explicitly specifies which character encoding has been used to save the translation file. This value will also determine which character encoding is used to save the forum posts submitted by members using this translation.

'iso639' is a two-letter or three-letter standard code that uniquely identifies languages. This code does not have to be unique among translations.

'language' is the untranslated name of the language as it is written natively. This value must be encoded in lower ASCII characters only. If the language name cannot be written natively using lower ASCII, then it must be encoded as standard HTML character entity references.

For example, a translation in French should include this near the top of the file: