This is an old revision of the document!
Translation
With version 2.2 we have separated all language texts of the code and added in a separate XML file. Thus a translation become relatively easy and we look forward to any other language in which we can offer Admidio.
First steps
If you want to add a new language to Admidio please contact us first. We can thus avoid that multiple people simultaneously translate a language and discuss problems or other things directly.
Register new language
First you must introduce the new language to Admidio so that it will be shown in the language select box. Therefore you musst add the ISO code and the name of the language to the XML file languages.xml in the folder adm_program/languages. The name of the language should not be translated, it should be the native name.
The following XML snippet must be adapted and another <language> tag should be appended to the file.
<language> <isocode>en</isocode> <name>english</name> </language>
Create language file
As a next step the language file should be created. Therefore an existing file could be copied. It is best to copy the English language file en.xml and take the ISO code of the new language as name for the file. The file extension should also be xml. Already now the new language can be choosen in the installation dialog and can be set in the organization settings. However all text will be displayed in the copied language because no text has been translated into the new language.
Translate language file
Now there are about 1400 texts that should be translated. Open the new language file isocode.xml with an editor. Here you find all Admidio texts grouped by the tag <version> which represents the Admidio version in which the text was added. All language files should have the same sorting, so please do not re-sort the lines. Each individual text is diplayed with the tag <text> and will be identified with the attribut id.
Additionally, there are 2 other attibute development and translation, which should help you with the translation.
The attribut development can have the values new, changed and deleted, which are distributed by the developers.
- new: This text has been added to the version, in which <version> tag it is filed.
- changed: This text has been changed in the version, in which <version> tag it is filed. Originally it was added in another version.
- deleted This text has been removed from Admidio in the version, in which <version> tag it is filed. This value would only be found in the reference languages English or German. In your language you should removed all texts from your xml file that are affected from the id.
The attribute translation is for the translator and can be forgiven by him. Here you can specify the status of your own translation of the text. In the reference language German, we create all the texts with the status todo. Other possible values would be edited or revised.
- todo: This text needs to be translated into the current language file.
- edited: This text has been translated, but could be improved.
- revised: This text is already translated.
Update language file
Was a translation of the language already started and just have not been updated for the current Admidio version, the following steps must be done.
Open the language file of the language you want to translate. Look for the <version> tags and search the tag with the highest attribut id. This was the latest version that was translated in the language file.
<version id="2.3.0"> ... </version> <version id="2.2.0"> ... </version>
Now open the language file of the reference language English (en.xml) or German (de.xml) and copy all newer <version> tags with their correspondings texts to your language file. Now you can translate this new texts into your distination language. Keep an eye on the tag development, which tells you the status of each text.
- new: This text has been added to the version, in which <version> tag it is filed. You only need to translate the text.
- changed This text has been changed in the version, in which <version> tag it is filed. Originally it was added in another version. Search the original tag <text> with the same id and delete the old version. Now translate the new version of this id.
- deleted This text has been removed from Admidio in the version, in which <version> tag it is filed. This value would only be found in the reference languages English or German. In your language you should removed all texts from your xml file that are affected from the id.
Now translate all neccessary texts and then you send us your new translation xml files. We integrate the file in our source code and your translation will then be included in the next Admidio release.