31,021
edits
| Line 71: | Line 71: | ||
Only sentences are = right to translate the code should remain unchanged. It is possible to translate the files one by one, without bringing them all at once. If a file has not been translated into the new language, Dolibarr use English. | Only sentences are = right to translate the code should remain unchanged. It is possible to translate the files one by one, without bringing them all at once. If a file has not been translated into the new language, Dolibarr use English. | ||
To have a localise tring into the PHP code, all you have to do then is loading the language file use the methode to get the translated value. This ca nbe done like this: | |||
<source lang="php"> | <source lang="php"> | ||
$langs->load("myfile"); // or use $langs->load("myfile@mymodule") if myfile.lang is inside directory htdocs/mymodule/langs/xx_XX | |||
$langs->trans("CodeX") | $langs->trans("CodeX") | ||
</source> | </source> | ||