ONYX - 9.0 - Utilisation

Translate

De MappingDoc
Révision datée du 2 janvier 2025 à 09:46 par Jdieu (discussion | contributions) (Page créée avec « 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. »)

<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.


Enfin, il est possible de définir le setlang dans les paramètres de la commande mapcpysplf : [ -setlang:           ] 

sachant que le setlang de la maquette est prioritaire sur celui de la ligne de commande.