Versions Compared

Key

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

...

The process simply consist of copying duplicating each file having the extension en_US inside  VIVO/Vitro -language  repositories and renaming the copy using the locale of the new language. The new file will reside along side (in the same directory) the original one.  

For example, when initializing the languages files for Estonian( et_EE),  copying the file vivo_all_en_US.properties will help creating vivo_all_et_EE.properties. Both of them will reside in vivo-languages/webapp/src/main/webapp/i18n

In the process of initializing the files for a new language. You will encounter the following types of file:


Text strings (.properties)

These files contain about 1500 words and phrases that appear in the VIVO/Vitro web pages.

...

  • in Vitro-languages/webapp/src/main/webapp/i18n
  • in VIVO-languages/webapp/src/main/webapp/i18n
  • in each theme's i18n directory. For instance : 
    • VIVO-languages/webapp/src/main/webapp/themes/tenderfoot/i18n and
    • VIVO-languages/webapp/src/main/webapp/themes/wilma/i18n

The application will look for an entry starting with the activated theme(like tenderfoot or wilma), then VIVO and lastly Vitro.

Freemarker Templates (.ftl)

Almost all of the text in the Freemarker templates is supplied by the text strings in the properties files. However, some Freemarker templates are essentially all text, and it seemed simpler to create a translation of the entire template. These include the help and about pages, the Terms of Use page, and the emails that are sent to new VIVO users.

...

titleExample file names

They are located in:

  • Vitro-languages

...

  • /webapp/

...

  • src/main/webapp/templates/freemarker

...

  • VIVO-languages/webapp/src/main/webapp/templates/freemarker/body
  • VIVO-languages/webapp/src/main/webapp/templates/freemarker/visualization/capabilitymap
  • VIVO-languages/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience

Here are some examples of templates files to create for Estonian support

Code Block
titleExample file names
Vitro-languages/webapp/src/main/webapp/templates/freemarker/search-help_et_EE.ftl
Vitro-languages/webapp/src/main/webapp/templates/freemarker/termsOfUse_et_EE.ftl
Vitro-languages/webapp/src/main/webapp/termsOfUse_et_EE.ftl
[Vitro]/webapp/languages/et_EE/templates/freemarker/userAccounts-acctCreatedEmail_et_EE.ftl
[Vitro]-languages/webapp/languages/et_EEsrc/main/webapp/templates/freemarker/userAccounts-acctCreatedExternalOnlyEmail_et_EE.ftl
[Vitro]-languages/webapp/src/languagesmain/et_EEwebapp/templates/freemarker/userAccounts-confirmEmailChangedEmail_et_EE.ftl
[Vitro]-languages/webapp/src/languagesmain/et_EEwebapp/templates/freemarker/userAccounts-firstTimeExternalEmail_et_EE.ftl
[Vitro]-languages/webapp/src/languagesmain/et_EEwebapp/templates/freemarker/userAccounts-passwordCreatedEmail_et_EE.ftl
[Vitro]-languages/webapp/src/languagesmain/et_EEwebapp/templates/freemarker/userAccounts-passwordResetCompleteEmail_et_EE.ftl
[Vitro]-languages/webapp/languages/et_EEsrc/main/webapp/templates/freemarker/userAccounts-passwordResetPendingEmail_et_EE.ftl
[VIVO]/languages/et_EEVIVO-languages/webapp/src/main/webapp/templates/freemarker/body/aboutMapOfScience_et_EE.ftl
[VIVO]/languages/et_EEVIVO-languages/webapp/src/main/webapp/templates/freemarker/body/aboutQrCodes_et_EE.ftl
[VIVO]/languages/et_EEVIVO-languages/webapp/src/main/webapp/templates/freemarker/visualization/mapOfScience/mapOfScienceTooltips_et_EE.ftl

...

Data in the RDF models includes labels for the properties and classes, labels for property groups and class groups, labels for menu pages and more.  In each case, the delivered file in english English has a corresponding file with the same name followed by and underscore and the name of the locale.  See below:

...