Attention

You’re viewing an old version of the L’ART Research Assistant documentation. The project has moved to https://lart.readthedocs.io/projects/research-assistant.

Localisation and Adding Translations

All tasks in the L’ART Research Client are designed to allow easy implementation of interfaces in any language you choose.

At the moment, the languages available depend on the specific task. The LSBQe, for example, is available in English, German, Greek, Italian, and Welsh. The setup is for four bilingual communities: Welsh-English, Lombard-Italian, Moselle Franconian-German, and Greek-English:

Screenshot of selecting a version of the LSBQe

Fig. 1 Selecting a version of the LSBQe

However, both the working languages and the setup for specific bilingual communities can be easily changed by providing a translated version of teh task you require to suit your own research settings. Below we provide instructions on how to do this using the LSBQe as example, though the same procedures can also be applied to the AToL-C and AGT.

To adapt a task for a new language community, you will need to create a new file, provide a translation for each interface item and then save it with a specific naming convention. Each step is outlined below.

Creating and Naming your file

To create a new file for your translation, go to the location where the L’ART app is installed, and open the Versions folder.

Below is the path you need to follow in order to find it. The path your app is located in depends on whether you installed the app for a single user or for all users (you will have made this choice on installation).

Below is an example of the path when the app is installed for a single user:

Screenshot of finding the “versions” folder if you installed L'ART Research Client for a single user.

Fig. 2 Finding the “versions” folder if you installed L’ART Research Client for a single user

However, if you installed the app for all users, you will find the Versions folder by following a different path, as below:

Screenshot of finding the “versions” folder if you installed L'ART Research Client for all users

Fig. 3 Finding the Versions folder if you installed L’ART Research Client for all users

To have an interface in the language of your choosing, open the file called CymEng_Eng_GB.json. This is the British-English version of the interface built to work with Welsh-English bilinguals.

You can open this in Notepad, or any text editor of your choice.

Go to File and then Save as, and save it with a new name that includes the language and a label for the bilingual community you plan to study.

Note

Naming must be done in a specific manner so that the app can find and read the translation you provide.

The naming convention adopted in the L’ART Research Client is based on ISO 639 codes for the languages (a full list can be found here) and on ISO 3166-1 alpha-2 codes for the countries, but uses capital letters for the language codes in keeping with CamelCase as follows:

../_images/tutorial_naming_conventions.png

Therefore, the Italian language file to be used for research with the Lombard-Italian bilingual community based in Italy is named: LmoIta_Ita_IT.json.

In the instance where you would like to provide a Modern Standard Arabic translation (Iso code: arb) to study a bilingual community in Morocco (ISO code: MA) whose native languages are Moroccan Arabic (ary) and Berber (ber) you would label your file “BerAry_Arb_MA.json”.

Similarly, if you would like to provide a Spanish translation (Iso code: spa) to study a bilingual community in Spain (ISO code: ES) whose native languages are Galician (glg) and Spanish (spa), you would label your file “GlgSpa_Spa_ES.json”.

Adding your translation

Your newly created file will now be identical to the original British-English file (except for its name)! Now it’s time to add your translation. The translation file involves two main pieces of information: a set of labels and a language output. The labels are what the L’ART Research Client needs in order to function, while the language output is what you will see in your interface.

To provide your translated version, you need to highlight each bit of language output and replace it with your translation. Make sure you do not change the labels though, otherwise the app will not find your translation and instead, will output the default English version.

First, you will need to provide some basic information about the file. This is the information under the header “meta”. With your new file open in a text editor, begin by highlighting the language output for the label versionId, as follows:

../_images/tutorial_highlighting_lang_output_versionid.png

Then, replace it with the code for your translation. Using our Galician-Spanish example above, this will look as follows:

../_images/tutorial_replacing_lang_output.png

Now go through each item and provide the relevant information for the header “meta”, namely:

  1. The version name

  2. The authors’ / author’s name(s) and email address(es)

  3. The date that the file is created.

Once you’ve completed that, you may begin the translation properly.

Ensure that you highlight each language output for each item and provide your translation! For example, under the label “yes”, you would replace the output “yes” with “Sí”, taking care not to change the label, which must remain “yes”, as follows:

../_images/tutorial_lang_output_yes.png

And that’s it! Once you have replaced all items with your translations, restart the app and you will see your Galician-Spanish version, like so:

../_images/tutorial_dropdown_list_lang.png