Define new language: Difference between revisions

From ARIS
Jump to navigation Jump to search
No edit summary
Alberto (talk | contribs)
Marked this version for translation
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Define new language]]
[[Category:Define new language]]
<languages/>
<translate>
<!--T:1-->
In this section you will find the information that will help you to add new languages to the ARIS application.


In this section you will find the information that will help you to add new languages to the ARIS application.
<!--T:9-->
__TOC__


==Introducction==
==Introducction== <!--T:2-->
The multilanguage system of ARIS is implemented through some files, but to add a new language you will only need to know about two of them: ''languageList.json'' and the language JSON files.  
The multilanguage system of ARIS is implemented through some files, but to add a new language you will only need to know about two of them: ''languageList.json'' and the language JSON files.  
You will find these files in the ''lang'' folder in ARIS system files (under "C:\Users\Public\ARIS\Frontend\build" by default in MSWindows).
You will find these files in the ''lang'' folder in ARIS system files (under "C:\Users\Public\ARIS\Frontend\build" by default in MSWindows).


===''languageList.json''===
===''languageList.json''=== <!--T:3-->
This file contains a list of all the languages ​​that the multilanguage system of the ARIS application can handle. All the languages ​​it contains will appear in the dropdown menu on the ARIS navigation bar.
This file contains a list of all the languages ​​that the multilanguage system of the ARIS application can handle. All the languages ​​it contains will appear in the dropdown menu on the ARIS navigation bar.
[[File:LanguageList.PNG|none|400px|thumb| ''languageList.json'']]
[[File:LanguageList.PNG|none|400px|thumb| ''languageList.json'']]


===Language JSON files===
===Language JSON files=== <!--T:4-->
By default, the ARIS system contains language JSON files that correspond to the Spanish and English languages.  
By default, the ARIS system contains language JSON files that correspond to the Spanish and English languages.  
These files contain all the translations of the messages displayed in ARIS interface, following a JSON structure where the key has to be the same in all the language files, you can see the example in the images below.
These files contain all the translations of the messages displayed in ARIS interface, following a JSON structure where the key has to be the same in all the language files, you can see the example in the images below.
Line 17: Line 22:
[[File:EsJson.png|none|400px|thumb| Spanish JSON file. Notice that the keys for the same words are the same as in both files]]
[[File:EsJson.png|none|400px|thumb| Spanish JSON file. Notice that the keys for the same words are the same as in both files]]


==How to add a new language?==
==How to add a new language?== <!--T:5-->
Thanks to how the multilanguage system is implemented, in order to add a new language not provided by default in the distribution, you only have to follow two simple steps that we explain below.
Thanks to how the multilanguage system is implemented, in order to add a new language not provided by default in the distribution, you only have to follow two simple steps that we explain below.


  · '''Step 1:''' Add a new language JSON file. Remember that it must follow the same structure as the files for other languages, so they must all contain the same keys. We recommend naming the new files as the [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1] code of the new language.
  <!--T:6-->
· '''Step 1:''' Add a new language JSON file. Remember that it must follow the same structure as the files for other languages, so they must all contain the same keys. We recommend naming the new files as the [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1] code of the new language.


  · '''Step 2:''' Add the new language to the ''languageList.json'' file just as the other languages already listed.
  <!--T:7-->
· '''Step 2:''' Add the new language to the ''languageList.json'' file just as the other languages already listed.
   ''{"fileName": "NewLanguageCode", "label": "NewLanguageName"},''
   ''{"fileName": "NewLanguageCode", "label": "NewLanguageName"},''


You don't have to worry about modifying any other file, if you have followed the above two steps you have successfully added a new language to the ARIS system, that will automatically be added to the [[User Guide#Language|Language]] in the [[User Guide#Navigation bar|Navigation bar]].
<!--T:8-->
You don't have to worry about modifying any other file, if you have followed the above two steps you have successfully added a new language to the ARIS system, that will automatically be added to the Language in the [[User Guide#Navigation bar|Navigation bar]].
</translate>

Latest revision as of 17:51, 13 January 2024

In this section you will find the information that will help you to add new languages to the ARIS application.

Introducction[edit]

The multilanguage system of ARIS is implemented through some files, but to add a new language you will only need to know about two of them: languageList.json and the language JSON files. You will find these files in the lang folder in ARIS system files (under "C:\Users\Public\ARIS\Frontend\build" by default in MSWindows).

languageList.json[edit]

This file contains a list of all the languages ​​that the multilanguage system of the ARIS application can handle. All the languages ​​it contains will appear in the dropdown menu on the ARIS navigation bar.

languageList.json

Language JSON files[edit]

By default, the ARIS system contains language JSON files that correspond to the Spanish and English languages. These files contain all the translations of the messages displayed in ARIS interface, following a JSON structure where the key has to be the same in all the language files, you can see the example in the images below.

English JSON file
Spanish JSON file. Notice that the keys for the same words are the same as in both files

How to add a new language?[edit]

Thanks to how the multilanguage system is implemented, in order to add a new language not provided by default in the distribution, you only have to follow two simple steps that we explain below.

· Step 1: Add a new language JSON file. Remember that it must follow the same structure as the files for other languages, so they must all contain the same keys. We recommend naming the new files as the ISO 639-1 code of the new language.
· Step 2: Add the new language to the languageList.json file just as the other languages already listed.
 {"fileName": "NewLanguageCode", "label": "NewLanguageName"},

You don't have to worry about modifying any other file, if you have followed the above two steps you have successfully added a new language to the ARIS system, that will automatically be added to the Language in the Navigation bar.