Define new language/pt: Difference between revisions

From ARIS
Jump to navigation Jump to search
Jamba (talk | contribs)
Created page with "__TOC__"
Otman (talk | contribs)
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 5: Line 5:
__TOC__
__TOC__


<div lang="en" dir="ltr" class="mw-content-ltr">
==Introdução==
==Introducction==
O sistema multilíngue do ARIS é implementado através de alguns arquivos, mas para adicionar um novo idioma será necessário familiarizar com dois deles: ''linguagemList.json'' e os arquivos JSON de idioma.
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.  
Se encontrará esses arquivos na pasta ''lang'' nos arquivos de sistema ARIS (em "C:\Users\Public\ARIS\Frontend\build" por padrão no 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).
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===''languageList.json''===
===''languageList.json''===
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.
Este arquivo contém uma lista de todos os idiomas que o sistema multilíngue da aplicação ARIS pode suportar. Todos os idiomas que o mesmo contém aparecerão no menu suspenso da barra de navegação do ARIS.
[[File:LanguageList.PNG|none|400px|thumb| ''languageList.json'']]
[[File:LanguageList.PNG|none|400px|thumb| ''languageList.json'']]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
===Arquivos JSON de linguagem===
===Language JSON files===
Por padrão, o sistema ARIS contém arquivos JSON de idioma que correspondem aos idiomas espanhol e inglês.
By default, the ARIS system contains language JSON files that correspond to the Spanish and English languages.  
Esses arquivos contêm todas as traduções das mensagens exibidas na interface ARIS, seguindo uma estrutura JSON onde a chave deve ser a mesma em todos os arquivos de idioma, se pode ver o exemplo nas imagens abaixo.
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.
[[File:EnJson.png|none|400px|thumb| English JSON file]]
[[File:EnJson.png|none|400px|thumb| English JSON file]]
[[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. Observe que as chaves para as mesmas palavras são as mesmas em ambos os arquivos.]]
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
==Como adicionar um novo idioma?==
==How to add a new language?==
Graças à forma como o sistema multilíngue é implementado, para adicionar um novo idioma não fornecido por padrão na distribuição, você só precisa seguir dois passos simples que explicamos abaixo.
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.
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  · '''Etapa 1:''' Adicione um novo arquivo JSON de idioma. Lembre-se de que ele deve seguir a mesma estrutura dos arquivos para outros idiomas, portanto, todos devem conter as mesmas chaves. Recomendamos nomear os novos arquivos como o código [https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO 639-1] do novo idioma.
· '''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.
</div>


  <div lang="en" dir="ltr" class="mw-content-ltr">
  · '''Etapa 2:''' Adicione o novo idioma ao arquivo ''languageList.json'', assim como os outros idiomas já listados.
· '''Step 2:''' Add the new language to the ''languageList.json'' file just as the other languages already listed.
'{"fileName": "NovoCódigoDeIdioma", "label": "NovoNomeDeIdioma"},''
  ''{"fileName": "NewLanguageCode", "label": "NewLanguageName"},''
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
Não será necessário modificar nenhum outro arquivo, com os dois passos anteriores, será suficiente para adicionar com sucesso um novo idioma ao sistema ARIS, que será automaticamente adicionado ao Idioma no [[User Guide/pt#Barra_de_navegação|Barra de navegação]].
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]].
</div>

Latest revision as of 13:44, 22 May 2025

Nesta seção encontrará informações que o ajudarão a adicionar novos idiomas à aplicação ARIS.

Introdução

O sistema multilíngue do ARIS é implementado através de alguns arquivos, mas para adicionar um novo idioma será necessário familiarizar com dois deles: linguagemList.json e os arquivos JSON de idioma. Se encontrará esses arquivos na pasta lang nos arquivos de sistema ARIS (em "C:\Users\Public\ARIS\Frontend\build" por padrão no MSWindows).

languageList.json

Este arquivo contém uma lista de todos os idiomas que o sistema multilíngue da aplicação ARIS pode suportar. Todos os idiomas que o mesmo contém aparecerão no menu suspenso da barra de navegação do ARIS.

languageList.json

Arquivos JSON de linguagem

Por padrão, o sistema ARIS contém arquivos JSON de idioma que correspondem aos idiomas espanhol e inglês. Esses arquivos contêm todas as traduções das mensagens exibidas na interface ARIS, seguindo uma estrutura JSON onde a chave deve ser a mesma em todos os arquivos de idioma, se pode ver o exemplo nas imagens abaixo.

English JSON file
Spanish JSON file. Observe que as chaves para as mesmas palavras são as mesmas em ambos os arquivos.

Como adicionar um novo idioma?

Graças à forma como o sistema multilíngue é implementado, para adicionar um novo idioma não fornecido por padrão na distribuição, você só precisa seguir dois passos simples que explicamos abaixo.

· Etapa 1: Adicione um novo arquivo JSON de idioma. Lembre-se de que ele deve seguir a mesma estrutura dos arquivos para outros idiomas, portanto, todos devem conter as mesmas chaves. Recomendamos nomear os novos arquivos como o código ISO 639-1 do novo idioma.
· Etapa 2: Adicione o novo idioma ao arquivo languageList.json, assim como os outros idiomas já listados.

'{"fileName": "NovoCódigoDeIdioma", "label": "NovoNomeDeIdioma"},

Não será necessário modificar nenhum outro arquivo, com os dois passos anteriores, será suficiente para adicionar com sucesso um novo idioma ao sistema ARIS, que será automaticamente adicionado ao Idioma no Barra de navegação.