Versions Compared

Key

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

...

The language files

You can get the Spanish or the English US English (en_US) files from the VIVO-language and Vitro-language among the vivo-project repositories(https://github.com/vivo-project), to use as a template for your own files.

The example that follow assume that you are creating files for the Estonian language, as spoken in Estonia, with the locale et_EE.

Text strings (.properties)

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

These words and phrases have been removed from the page templates, so no programming knowledge is required to translate them.

process simply consist of copying 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_allThere is one file for phrases used in Vitro, the core around which VIVO is built, and one file for phrases that are specific to VIVO. In the example, these two files are both called all_et_EE.properties and reside in Vitro and VIVO directories respectively.

Code Block
titleExample file names
[Vitro]/webapp/languages/et_EE/i18n/all_et_EE.properties
[VIVO]/languages/et_EE/themes/wilma/i18n/all_et_EE.properties

The two sample lines below show Estonian language that will be used when a template needs to show text for "minimum_image_dimensions" and for the "cropping caption".  Note that the first example contains place holders {0} and {1} that will be used by Freemarker during run-time to provide height and width values.

...

titleExample content

...

. 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.

These words and phrases have been removed from the page templates, so no programming knowledge is required to translate them.

They appear at different level in the application :

  • 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 theme, then VIVO and lastly Vitro


Freemarker Templates (.ftl)

...