Name
Pass

1. Language files

| 2. Material files

Language files are the simplest of the LD4DStudio collection of file formats. They only have two important elements, namely the root element "Language" and the phrase containing "String" element.

The generic structure is as follows:

<Language>
 <Strings>
  <String> ....... </String>
  <String> ....... </String>
  <String> ....... </String>
 </Strings>
</Language>

The easist way to create a language file is by making a copy of the english.xml file and renaming it to the English name of the chosen language, e.g. german.xml.

When done you open it in your favorite XML editor or UTF-8 supporting generic text editor, and start translating the phrases between the <String> and </String> elements.

But before you do that let's discuss the two main elements and their attributes.

The "Language" element

First let's go over the root element, it has five supported attributes, namely:

langNameThis is the name of the language as displayed in the configuration dialog of LD4DStudio. You're free to use any value but in order to keep things clean I urge you to use the English name for the language followed by it's native name, e.g. "German / Deutch".
langVersionThis is used to state the version of the file itself. e.g. "1.0" for the fist version and "1.1" for a revised version. You should renumber for every new host version (see below).
hostNameThis should always contain "LD4DStudio", indicating this is a language file targeted at an LD4DStudio version.
hostVersionThis should state the general version of LD4DStudio this language file is designed for e.g. ("1.1").
authorHere you can place your name, in order to take credit for the translation work.

The "String" element

Below the root "Language" element you'll find the "Strings" element which indicates the start of hundreds of "String" elements.

Every single String element holds a phrase or word between the opening and closing element. The "name" attribute holds the phrase's id which is used to place the phrase on dialogs where it's needed. Most id's are also roughly the English phrase expected for this string. But for grouping and special cases use they can also be quite different. Therefore you should always use an official Language file (english.xml or dutch.xml) as a base for translation in order to get the grammatical goal of a phrase correct.

Testing your language file

When done translating a file you can test it by placing it in the languages folder in the LD4DStudio installation folder. It then will be listed in the configuration dialog. But it might appear with a non 'ok' status. Reasons for this can be XML formating mistakes, non UTF-8 format, missing phrases.

After correcting any format problems you might only have some missing phrases whom prevent your language file to be used. These are easily solved by creating the appropriate extra string elements for them. The LD4DStudio log file will list missing phrase id's whenever a language file is read, so check the log if you are having problems.

Conclusion

This is all there is to know about language files, if you are interested in creating one for your native language please contact me first, someone else might be doing the same thing already which means you could divide work.

When finished send me ether the file or information on where to get it and I will add link / download information on the site so people can get your language file.

In order to include your language file in the next release you will need to commit to the work needed in getting the file updated to changes made in new releases. Only complete and double checked files can and will be included in LD4DStudio releases.

| 2. Material files
Best viewed with Firefox 2, Seamonkey or IE 7 at 1024x768 or higher resolution.
 
LEGO is a registered trademark of the LEGO Group, which does not sponsor, endorse, or authorize this website.