Changes

Jump to navigation Jump to search
Line 9: Line 9:  
<seo metak="translation, documentation, translator, localize, localization, i18n, internationalization, language" />
 
<seo metak="translation, documentation, translator, localize, localization, i18n, internationalization, language" />
   −
= [[File:Language.png]] Translate Dolibarr Application into your language =
+
=[[File:Language.png]] Translate Dolibarr Application into your language=
    
Dolibarr language files are already translated in several languages.
 
Dolibarr language files are already translated in several languages.
Line 15: Line 15:  
Dolibarr can be translated by three different means:
 
Dolibarr can be translated by three different means:
   −
# Manually using Transifex (Official and recommended method).
+
#Manually using Transifex (Official and recommended method).
# Manually editing language files
+
#Manually editing language files
# Completely automatic: autotranslator
+
#Completely automatic: autotranslator
   −
== Manual Translation using Transifex online service (recommended) ==
+
==Manual Translation using Transifex online service (recommended)==
    
Transifex is a web application that provides an online platform for translation projects. It includes teams and discussion tools, translation memory, glossary, proofreading and a lot of other features.
 
Transifex is a web application that provides an online platform for translation projects. It includes teams and discussion tools, translation memory, glossary, proofreading and a lot of other features.
Line 40: Line 40:  
Any change for en_US language must be done in Dolibarr source code and submitted using a Pull Request on our GitHub repository.
 
Any change for en_US language must be done in Dolibarr source code and submitted using a Pull Request on our GitHub repository.
   −
=== Using TX command line client (for Dolibarr [[:Category:Yoda]] team) ===
+
===Using TX command line client (for Dolibarr [[:Category:Yoda]] team)===
 
This describes how to use Transifex from the command line. However, this is reserved to Dolibarr admin users to synchronize Transifex with Dolibarr main sources.
 
This describes how to use Transifex from the command line. However, this is reserved to Dolibarr admin users to synchronize Transifex with Dolibarr main sources.
   Line 110: Line 110:  
<nowiki>[dolibarr.resource]</nowiki>
 
<nowiki>[dolibarr.resource]</nowiki>
   −
source_lang: this is the source language of the resource.<br/>
+
source_lang: this is the source language of the resource.<br />
source_file: this points to the source file directly.<br/>
+
source_file: this points to the source file directly.<br />
file_filter: here we hold the expression used to identify translation files under the specific project. ''not mandatory''<br/>
+
file_filter: here we hold the expression used to identify translation files under the specific project. ''not mandatory''<br />
trans.<lang>: this is used for translation files that don’t follow a common naming schema and the file expression cannot be used to track them. ''not mandatory''<br/>
+
trans.<lang>: this is used for translation files that don’t follow a common naming schema and the file expression cannot be used to track them. ''not mandatory''<br />
host: in case the project doesn’t use the default Transifex server as specified in the [main] section, it can override it using this option. ''not mandatory''<br/>
+
host: in case the project doesn’t use the default Transifex server as specified in the [main] section, it can override it using this option. ''not mandatory''<br />
    
====TX Client use====
 
====TX Client use====
Line 139: Line 139:  
'''tx pull'''
 
'''tx pull'''
   −
Used to pull changes from Transifex server to your computer<br/>
+
Used to pull changes from Transifex server to your computer<br />
 
Additional options for the tx pull command are:
 
Additional options for the tx pull command are:
 
<code><pre>
 
<code><pre>
Line 168: Line 168:  
</source>
 
</source>
   −
=== Other questions on transifex process ===
+
===Other questions on transifex process===
 
This is short questions and answers you may also ask about transifex translation process:
 
This is short questions and answers you may also ask about transifex translation process:
   Line 185: Line 185:  
So transifex changes appear in all version whose branch is created after the transifex change (a sync is always done before creating a new branch). Once a branch is created, the new changes into transifex will be available only for the next branch. The reason for this is that transifex is not able to manage branch/versions (not yet).
 
So transifex changes appear in all version whose branch is created after the transifex change (a sync is always done before creating a new branch). Once a branch is created, the new changes into transifex will be available only for the next branch. The reason for this is that transifex is not able to manage branch/versions (not yet).
   −
== Manual Translation (not recommended) ==
+
==Manual Translation (not recommended)==
    
To translate Dolibarr into another language, go to the langs directory and create a folder/directory named with the code language to translate (follow the existing format, for example en_US, en_GB, es_ES, de_DE, etc...). Then copy the files from an existing language directory (for example en_US/main.lang, en_GB/bills.lang), into the new language directory that you have just created.
 
To translate Dolibarr into another language, go to the langs directory and create a folder/directory named with the code language to translate (follow the existing format, for example en_US, en_GB, es_ES, de_DE, etc...). Then copy the files from an existing language directory (for example en_US/main.lang, en_GB/bills.lang), into the new language directory that you have just created.
Line 217: Line 217:       −
== Automatic Translation with autotranslator.php tool ==
+
==Automatic Translation with autotranslator.php tool==
 +
 
 +
*Translator OS: All
 +
*Tool: '''autotranslator.php''' provided with Dolibarr in directory '''dev/translation'''.
   −
* Translator OS: All
  −
* Tool: '''autotranslator.php''' provided with Dolibarr in directory '''dev/translation'''.
   
This method is recommended when starting translation for a language not already initialized. If there is already a translation available but you need to add a missing key or correct errors, try to use method using Transifex (see later).
 
This method is recommended when starting translation for a language not already initialized. If there is already a translation available but you need to add a missing key or correct errors, try to use method using Transifex (see later).
   Line 237: Line 238:  
Your PHP must also have permissions to write into '''htdocs/langs''' directory and must have curl functions available.
 
Your PHP must also have permissions to write into '''htdocs/langs''' directory and must have curl functions available.
   −
= [[File:Language.png]] Distribute or include your translation into core source =
+
=[[File:Language.png]] Distribute or include your translation into core source=
    
Once you start translating, it's a smart decision to share it, so it can be included in the official code of Dolibarr.
 
Once you start translating, it's a smart decision to share it, so it can be included in the official code of Dolibarr.
Line 253: Line 254:  
If you are developing a new module, you are likely going to need the addition of new language variables. This is done exclusively through the update of the en_US language (htdocs/langs/en_US/ folder). Just modify these files to add the variable you need and send the resulting folder as part of your Pull Request. Refer to the developer documentation to learn how to contribute code (you will need an account on {{TemplateUrlSCM}}.
 
If you are developing a new module, you are likely going to need the addition of new language variables. This is done exclusively through the update of the en_US language (htdocs/langs/en_US/ folder). Just modify these files to add the variable you need and send the resulting folder as part of your Pull Request. Refer to the developer documentation to learn how to contribute code (you will need an account on {{TemplateUrlSCM}}.
   −
= [[File:Language.png]] Translate documentation on wiki =
+
=[[File:Language.png]] Translate documentation on wiki=
 
The wiki is written in 3 languages: English, French, and Spanish.
 
The wiki is written in 3 languages: English, French, and Spanish.
 
If you want to enhance documentation on one of these languages, all you have to do is to create an account on this wiki.
 
If you want to enhance documentation on one of these languages, all you have to do is to create an account on this wiki.
 
Then, you can edit existing pages to correct a bad translation or translate pages waiting for translation [[:Category:Page_waiting_for_translation]].
 
Then, you can edit existing pages to correct a bad translation or translate pages waiting for translation [[:Category:Page_waiting_for_translation]].
 +
 +
<br />
 +
 +
=== How to translate an existing page ? ===
 +
 +
==== Create a new page for the translated version. ====
 +
Start by creating a new page for the translated version. To do this, you can access an non existant URL : for example [[Translator documentation|<code>https://wiki.dolibarr.org/index.php/Ma_nouvelle_page_en_français</code>]]
 +
 +
The chosen title for the translated version of the page should be the translation of the title of the original English page.
 +
 +
==== Linking your new page to the original English page. ====
 +
To add a link to your newly created page on the original English page, you must edit it using the '''Edit wikicode''' (not the visual editor).
 +
 +
On the top of the page, search for a block that look like :
 +
<!-- BEGIN origin interlang links -->
 +
<!-- You can edit this section but do NOT remove these comments
 +
    Links below will be automatically replicated on translated pages by PolyglotBot -->
 +
<nowiki>[[fr:Documentation_traducteur]]</nowiki>
 +
<nowiki>[[es:Documentación_traductores]]</nowiki>
 +
<nowiki>[[zh:翻译文档]]</nowiki>
 +
<!-- END interlang links -->

Navigation menu