Versions Compared

Key

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

...

Panel
titleImage for locale selection (Estonian)

Adding language support to your local modifications

...

How VIVO supports languages

Language in the data model

...

Language support in VIVO pages

This section deals with the framework of the VIVO pages: the page titles, the prompts, the tool tips, the error messages; everything that doesn't come from the data model. These pieces of text are not stored in RDF, so we need a different mechanism for managing them.

The mechanism we use is based on the VIVO uses the Java language's built-in framework for Internationalization. You can find more information in the Java tutorials for resource bundles and properties files.

...

 In the I18n framework, displayed text strings are not embedded in the Java classes or in the Freemarker template. Instead, each piece of text is assigned a "key" and the code will ask the framework to provide the text string that is associated with that codekey. The framework has access to sets of properties files, one set for each supported language, and it will use the appropriate set to get the correct strings.

...

Code Block
titleUsing I18n strings from Java code
protected String getTitle(String siteName, VitroRequest vreq) {
    return I18n.text(vreq, "upload_image_page_title");
}

private String getPrompt(HttpServletRequest req, int width, int height) {
    return I18n.text(req, "minimum_image_dimensions", width, height);
}

...

Up through VIVO release 1.710, no attempt has been made to add language support to JSPs.

...