Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:entwickler:uebersetzen [2013/02/23 20:22] – further translation fasseen:entwickler:uebersetzen [2023/07/16 10:51] (current) fasse
Line 1: Line 1:
 ====== Translation ====== ====== Translation ======
-With version 2.2 we have separated all language texts of the code and added in separate XML file. Thus a translation become relatively easy and we look forward to any other language in which we can offer Admidio.+Admidio use separated language texts within the code that are added in separate XML files. Thus a translation become relatively easy and we look forward to any other language in which we can offer Admidio. Within the translation files we use the xml format of **Android String Resource**. Our translation files are available at [[https://www.transifex.com|Transifex]] and you can use that platform to perform the translation. After you are done, we import the translated files from Transifex to the Admidio source code. 
 + 
 +===== Add new language =====
  
 ==== First steps ==== ==== First steps ====
-If you want to add a new language to Admidio please [[m.fassbender@admidio.org|contact]] us first. We can thus avoid that multiple people simultaneously translate a language and discuss problems or other things directly.+If you want to add a new language to Admidio please [[m.fassbender@admidio.org|contact]] us first. We can thus avoid that multiple people simultaneously translate a language and discuss problems or other things directly. At the same time you can register yourself at [[http://www.transifex.com|Transifex]] and join the [[https://www.transifex.com/admidio/admidio/dashboard/|Admidio Project]]. 
 + 
 +==== Translate ==== 
 +If you got an //ok// from us to translate Admidio in your favorite language you can do so within [[http://www.transifex.com|Transifex]]. Please check if your language is accepted for Admidio otherwise ask for activation of the language and that we add you as a translator
  
-==== Register new language ==== +After that you can start to translatePlease start with the //resource// called **main program strings**. These are the strings Admidio needs. The other resources are plugins and countries that you may translate later.
-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. +If you have problems to select **english** as your source language then please have a look at {{:en:developers:documents:change_source_lang.pdf|this short how-to}}. This how-to starts at the [[https://www.transifex.com/admidio/program/dashboard/|Admidio Dashboard]] of Transifex.
-<code xml><language> +
-    <isocode>en</isocode> +
-    <name>english</name> +
-</language></code>+
  
-==== Create language file ====+Now you can start the translation of your favorite language.
  
-As a next step the language file should be createdTherefore an existing file could be copiedIt 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**. +==== Use your language within Admidio ==== 
-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.+If you want to see your work in Admidio you must download your translated strings from [[http://www.transifex.com|Transifex]] and copy this file to the Admidio folder **adm_program/languages**. 
 +Now you must introduce the new language to Admidio so that it will be shown in the language select box
  
-==== Translate language file ==== +Therefore you must add the ISO code and the name of the language to the php file **languages.php** in the folder **adm_program/languages**. The name of the language should be a combination of the english word and the name of the language in the language itself.
-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 following PHP snippet must be adapted and should be add to the beginning of the array list in the file just after **$gSupportedLanguages = array(** 
 +<code php>    'de'    => array( 
 +        'name'    => 'German - Deutsch (du)', 
 +        'isocode' => 'de', 
 +        'libs'    => 'de' 
 +    ),</code>
  
-The attribut **development** can have the values //new//, //changed// and //deleted//, which are distributed by the developers. +:!: Please note that the ISO code must be the same as the name of your xml fileE.gif your downloaded XML file has the name //xy.xml// than your ISO code is //xy//.
-  * **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 filedOriginally it was added in another version. +
-  * **deleted** This text has been removed from Admidio in the version, in which **<version>** tag it is filedThis 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 himHere 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//+Now restart your browser and go to your Admidio installationYou can now select your new language within the **Regional settings** of the **preferences**
-  * **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 ==== +==== Last step ==== 
-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.+Now translate all necessary texts and then [[m.fassbender@admidio.org|send us]] an email that the language is ready for delivery. We integrate the file in our source code and your translation will then be included in the next Admidio release.
  
-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. <code xml><version id="2.3.0"></code> +===== Improve existing language =====
-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** dieser Text wurde unter der Version, in der der Text eingeordnet ist, neu hinzugefügt. Hier brauchst du nur den Text übersetzen. +
-  * **changed** dieser Text wurde unter der Version, in der der Text eingeordnet ist, verändert. Ursprünglich wurde er aber in einer anderen Version hinzugefügt. Lösche den ursprünglichen Tag **<text>** mit derselben **id** aus der alten Version und übersetze den neuen Text. +
-  * **deleted** dieser Text wurde unter der Version, in der der Text eingeordnet ist, aus Admidio entfernt. Diesen Wert wird es i.d.R. nur in der Referenzsprachen deutsch oder  englisch geben. In anderen Sprachen sollte der Text mit der betroffenen **id** direkt aus der xml-Datei entfernt werden. Sowohl in der zu übersetzenden Version, als auch in alten Versionen+
  
-Übersetze nun alle noch nicht übersetzten Texte und danach kannst du diese neue Datei an uns schickenWir binden sie dann in die aktuelle Entwicklung von Admidio ein und beim nächsten Versionsupdate sind die neuen Übersetzungen dann enthalten.+If you want to improve an existing language of Admidio please [[m.fassbender@admidio.org|contact]] us first. At the same time you can register yourself at [[http://www.transifex.com|Transifex]] and join the [[https://www.transifex.com/admidio/admidio/dashboard/|Admidio Project]]. We will than give you the necessary rights to edit translations in your favorite language at Transifex. After that you are ready to start with the improvements to your language.
  • en/entwickler/uebersetzen.1361647376.txt.gz
  • Last modified: 2013/02/23 20:22
  • by fasse