How to translate texts in SaltOS

Translate different literals that have applications SaltOS  It's very simple. With just two steps achieve our purpose. In this mini tutorial two possible cases when you want to edit an existing translation, or when you want to add a new language were addressed.

First we will explain briefly how the system works language SaltOS. To do just enough to know two types of file.

Archive languages.

Path to the file: SaltOS/xml/common/langs.xml

This is the file that contains the information of different languages, their structure is very simple, containing rows xml <row>  two values. First <label> Language (Country) </label>  It is used to indicate text that appears in the user profile selector, the current format is language name in brackets country. And <value> file name </value>  which is the name of the file where that language texts are, the current format stands for both linked to underscore and the country in capitals (language_country).

Example of a row of langs.xml file:

  	<label>Español (España)</label>

Files translated texts.

Path to folder: SaltOS/xml/lang.

This is the file that contains the texts in different languages, one file per language. The file name consists of the name of the language and the Country (language_country), the file structure is very simple, containing rows xml <aplicación>With the name of each application SaltOS, each of these rows contains multiple values, each of these values ​​is a text in the application, <variable_interna> Translation Text </variable_interna>. Within these xml tags internal variable, can be found with two different attributes (revised and translated), if not find any attribute means that the text is translated and confirmed.


  • revised="False"This attribute indicates that the text is translated by an automatic translator.
  • translated="False"This attribute indicates that the text is not translated.

Example of a row texts contacts file:

  	<list>Listado de contactos</list>
  	<create>Nuevo contacto</create>
  	<formview>Detalle del contacto</formview>
  	<forminsert>Alta de un nuevo contacto</forminsert>
  	<formupdate>Modificación del contacto</formupdate>
  	<defaultdata>Datos del contacto</defaultdata>
  	<add>Añadir contacto</add>

Having explained this, if you want to add a new language, edit the langs.xml file and add a new row with the information in your language and then create a new file in the folder of translated files (xml / lang) with the appropriate name. Use file as shown in another language, please es_ES.xml file as it is with which the application is developed. Acronyms languages ​​and countries are based on ISO 639 you can find more information ISO 639.

XML lines
PHP lines
JS lines
T2T lines
XSLT lines
SQL lines