ONYX - 9.0 - Utilisation - Translate/en

Différence entre versions

De MappingDoc
(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. »)
(Page créée avec « knowing that the setlang of the template takes priority over that of the command line. »)
 
(Une révision intermédiaire par le même utilisateur non affichée)
Ligne 51 : Ligne 51 :
  
  
<nowiki>Enfin, il est possible de définir le setlang dans les paramètres de la commande mapcpysplf : [ -setlang:           ] </nowiki>
 
  
sachant que le setlang de la maquette est prioritaire sur celui de la ligne de commande.
+
<nowiki>Finally, it is possible to define the setlang in the parameters of the mapcpysplf command: [ -setlang: ] </nowiki>
 +
 
 +
 
 +
knowing that the setlang of the template takes priority over that of the command line.

Version actuelle datée du 2 janvier 2025 à 09:47

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