Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

StepAction

1) Create directory structures in Vitro-languages and VIVO-languages

The demonstration is for the integration of the French Canadian fr_CA in Vitro-languages and VIVO-Languages


Code Block
languagebash
titlePreparing Vitro-languages
cd $GIT_REPO/Vitro-languages
cp -r en_US fr_CA
mv en_US/webapp/src/main/webapp/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/all_fr_CA.properties


Code Block
languagebash
titlePreparing VIVO-languages
cd $GIT_REPO/VIVO-languages
cp -r en_US fr_CA
mv fr_CA/webapp/src/main/webapp/i18n/vivo_all_en_US.properties fr_CA/webapp/src/main/webapp/i18n/vivo_all_fr_CA.properties 
mv fr_CA/webapp/src/main/webapp/themes/wilma/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/themes/wilma/i18n/all_fr_CA.properties
mv fr_CA/webapp/src/main/webapp/themes/tenderfoot/i18n/all_en_US.properties fr_CA/webapp/src/main/webapp/themes/tenderfoot/i18n/all_fr_CA.properties


2) Translate the content of each properties file into the target language (here, the en_CA)

This step can be done by using any text editor out of the VIVO platform. However, till the VIVO 1.13.0 version the online translator has been introduced to help in this process. In order to use this feature, a user has to be logged in as an administrator and to turn on online translator in the developer panel. After that, an online translator panel will appear at the left side of the screen with extracted all labels of the certain page. The translation of those labels can be entered in input fields and at the end the user can export translations in a form of a property file. 


Code Block
titleCanadian French Translation example
save_changes=Sauvegarder
save_entry=Sauvegarder
select_existing=Choisir l'enregistrement existant
select_an_existing=Choisir un enregistrement existant
add_an_entry_to=Ajouter un enregistrement de type 
change_entry_for=Modifier l'enregistrement pour: 
add_new_entry_for=Ajouter un enregistrement pour: 
change_text_for=Changement du texte pour: 
cancel_link = Annuler
cancel_title = annuler
required_fields = champs requis


3) Creating themes

Copy and adapt the themes from en_US to en_CA for  VIVO-Languages

Translate each file of type en_US in the fr_CA/.../themes directory

  • translate the content into the target language
  • rename the file extension xxx_en_US.xxx with the extension of the target language (e.g. xxx_en_CA.xxx)



Code Block
mkdir -p VIVO-languages/fr_CA/webapp/src/main/webapp/themes/
cp -r VIVO-languages/en_US/webapp/src/main/webapp/themes/* VIVO-languages/fr_CA/webapp/src/main/webapp/themes/


4) Creating resources directory and assembly file

  • the 'home.xml' file is necessary to ensure a viable compilation of the language files.
  • Only VIVO-languages contains home.xml file
  • Although is empty, it is necessary to create the directory resources 


Code Block
mkdir -p /VIVO-languages/fr_CA/home/src/main/resources/rdf/i18n/fr_CA
mkdir -p VIVO-languages/fr_CA/home/src/main/assembly/
cp VIVO-languages/en_US/home/src/main/assembly/home.xml VIVO-languages/fr_CA/home/src/main/assembly/


...