Translator documentation: Difference between revisions

Jump to navigation Jump to search
Line 16: Line 16:
To make or update all files of a language code, just run the script:
To make or update all files of a language code, just run the script:
<source lang="bash">
<source lang="bash">
php autotranslator.php lang_code_source lang_code_target
php autotranslator.php lang_code_source lang_code_target GOOGLEAPIKEY
</source>
</source>
For example :
For example :
Line 25: Line 25:


All non existing files will be created, all existing files will be updated.
All non existing files will be created, all existing files will be updated.
The tool use [http://translate.google.com Google translation] service to find the translation value of a string, so a working Internet connection is required from station running the script. Because of limits of Google service, you may need to run the script secevral times to complete strings that fails. Script will automatically not translate strings already translated and submit only new lines.
The tool use [http://translate.google.com Google translation] service to find the translation value of a string, so a working Internet connection is required from station running the script. Also a GOOGLEAPIKEY is required and Google charges a fee for using this service (20 euros / 1 000 000 of translated chars).
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.


Navigation menu