ALOV logo

DOCUMENTATION

For localization of project (names of layers, labels for symbols etc) you have to define child elements for elements that have the following attributes name, label and labelfield.

<layer name="Cities"> ... <name xml:lang="fr">Les Villes</name> <name xml:lang="de">Die Städte</name> ... <renderer type="label" labelfield="NAME" label="Names of cities"> <label xml:lang="fr">Les noms des villes</label> <label xml:lang="de">Die Benennungen der Städte</label> <labelfield xml:lang="fr">NAME_FR</labelfield> <labelfield xml:lang="de">NAME_DE</labelfield> ... </renderer> </layer>

For localization of applet messages and labels of applet components you have to define element resources for your language in layout file.

If you want to see ALOV Map available in your language, then all we need from you is a copy of the translated layout file.

You may find the list of translated layouts on download page

To activate the language you have to set up the parameter for applet tag.

<applet> ... <param name="lang" value=[language]> ... </applet>

[language] is a valid ISO Language Code. These codes are the lower-case two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as: http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt

Our XML parser sets default encoding as ISO-8859-1. For non ISO-Latin letters you may use other encodings sets but it is recommended to use UTF-8 for better portability.

<?xml version="1.0" encoding="UTF-8"?>

For proper displaying of characters stored in attribute data you have to define metadata element #305 for dataset:

<meta id="305" content=[encoding]/>

[encoding] is a canonical name of encoding set. See the list of supported encodings: http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

Besides, there is applet parameter. It is a encoding default value.

<applet> ... <param name="encoding" value=[encoding]> ... </applet>

To make sure you characters displays properly you may write your own translation to unicode. In this case you have to create the implementation of interface org.alov.util.LangDriver. You may download example for Cyrillic.

In this case you have to set up the "langdriver" parameter for applet tag

<applet> ... <param name="langdriver" value="org.alov.util.LangDriver_ru"> ... </applet>

To define locale name for data fields you have to define metadata elements #304:

<meta id="304" xml:lang="fr" content="NAME=Le nom"/> <meta id="304" xml:lang="fr" content="POPULATION=la population"/> <meta id="304" xml:lang="fr" content="COUNTRY=le pays"/>

Here is example

previous  top


next


© ALOV 2002-2005 contact6 at alov.org