Hi,
is there any info on how this can be done yet?
While there's no official documentation on how to localise your version of Matrix, it's a relatively simple process if you are familiar with XML. If you look through your system you will find a number of locale/en directories, such as:
- /path/to/matrix/core/locale/en
[*]/path/to/matrix/core/assets/page_templates/page_standard/locale/en
[*]lang_screen_details.xml
[*]lang_errors.xml
[*]lang_messages.xml
[*]lang_strings.xml
[/list]What you need to do is copy the 'en' directory to another two character directory matching the language you are translating to, such as 'de', 'fr' or 'jp' for German, French or Japanese respectively. This means you would now have locale/en AND locale/jp directories (or similar).
...then you begin the arduous task of translating everything.
After this is done, make sure you have CLI support compiled into PHP and run:
php /path/to/matrix/install/compile_locale.php /path/to/matrix
After you've done that, just go to System Configuration > Internationalisation Settings > Default Backend Locale and set it to the language you've just translated to.
Hope that helps. I'll get the developer who wrote localisation to check over my post to make sure it's all correct. Just start translating and by the time you're done, he'll probably have commented :P.
Yep this all seems to check out, just a few notes on translation if you havent worked these out already.
source strings for the various strings and errors are printf format, so you can declare variables that can be passed in (i.e. "welcome user: %1$s %2$s"). Internal messages are in a different format, take a look at a file for an example
translate() :: takes a source string (the source value in the xml tag) followed by any variables needed
trigger_localised_error() :: Will take the error code, followed by the error level, then any other variables you require for your string
Hope this is what you were looking for
Thanks for your response.
Found several xml files. Is it possible to get more info about how to find all xml files?
[quote]Thanks for your response.
Found several xml files. Is it possible to get more info about how to find all xml files?
[right][post=“7153”]<{POST_SNAPBACK}>[/post][/right][/quote]If you’re on a Linux host, SSH in and do the following:
cd /path/to/matrix
find ./packages ./core -iname lang*.xml && find ./packages ./core -iname edit_interface*.xml...that will give you a nice long list and you'll be busy for a while :).
You can use the locale backup/restore scripts as well, in scripts/locale to create combined central files for simpler translation. Just check the comments at the top of each script for usage information.