ONYX - 9.0 - Utilisation

Translate

De MappingDoc
Révision datée du 2 janvier 2025 à 09:47 par Jdieu (discussion | contributions) (Page créée avec « knowing that the setlang of the template takes priority over that of the command line. »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

<language/>

For text translation, it is possible to use the Translate function with Designer.


You must first create a Tools area of ​​the “set lang” type:

Image setlang.png


Which can be conditioned to a value on the spool or given hard (in label av. or label ap.).

Example :

Image condition setlang.png

As a result, we can create several “Set lang” packaged to manage several languages, for example.


It is obvious that the value of “Set lang” must be read before the zones to be translated. It must therefore be placed first.

Image position setlang.png


You must then configure the text boxes to translate:

Image translate.png


or, we can use it for variables with [[TR:variable_name]]


The value of the “set lang” field must be present in the name of the translation file.


Example for the value Set Lang = EN, the file sought is Translate_EN.txt.

for the value Set Lang = FR, the file sought is Translate_FR.txt


By default, if Set Lang has no value, it searches for the Translate_.txt file


Example file content :

Image fichier translate.png


It is necessary to have a carriage return at the last line of the translation file so that the last character is taken into account.


Finally, it is possible to define the setlang in the parameters of the mapcpysplf command: [ -setlang: ]


knowing that the setlang of the template takes priority over that of the command line.