|
To setup multiple language support in SiteStudio, you must configure the following
in the psoft_config/masonry.properties file:
Also, see the example of multiple language config.
Default Character Encoding.
The default SiteStudio encoding is set by ENCODING property.
Syntax: ENCODING=<charsetName>, where:
<charsetName> - is a canonical name of the charset listed in
IANA Charset Registry.
In IANA registry every charset has a canonical name and may also have one or more aliases.
The canonical name is called from the Name: variable of IANA charset specification. Canonical names are,
by convention, usually in upper case. The aliases are listed by Alias: variable.
Many charsets are given more than one name in the registry, in which case the registry identifies one of
the names as MIME-preferred. If a charset has more than one registry name, then its canonical name
must be the MIME-preferred name and the other names in the registry must be valid aliases.
Examples:
ENCODING=ISO-8859-1;
ENCODING=windows-1251.
Default Locale
The default SiteStudio locale is set by LOCALE property.
Syntax:
LOCALE=<lngCode>_<couCode>_<encCode>, where:
<lngCode> - 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.
<couCode> - is a valid ISO Country Code.
These codes are the upper-case two-letter codes as defined by ISO-3166.
You can find a full list of these codes at a number of sites, such as:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.
<encCode> - is a valid encoding alias for
ENCODING property.
You can find a full list of these aliases at a number of sites, such as:
http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html.
Remember: you can omit this code but in this case file
that coresponds to this locale must be created with
ISO-8859-1 encoding.
Examples:
LOCALE=en_US;
LOCALE=ru_RU_CP1251.
List of languages
List of languages in SiteStudio is set by LANG_LIST property.
Syntax:
LANG_LIST=<aLanguage> <aLanguage> <aLanguage>...,
where:
<aLanguage>=<locale>|<charset>:<description>
<locale> - is shaped as the
LOCALE property in the default locale section.
<charset> - is shaped as the
ENCODING property in the default encoding section.
<description> - description of the language
which is taken from the
psoft_config/langs/lang_<locale>.properties file.
Remember: LANG_LIST property must
always contain the default locale.
Example:
LANG_LIST=en_US_ISO8859_1|ISO-8859-1:langs.englang ru_RU_CP866|IBM866:langs.ruslang
Example of multiple language config.
After you have configured the masonry.properties file for
multiple languages support, for each language you specified in
LANG_LIST property, you must create the file with
name psoft_config/langs/lang_<locale>.properties
which must be translated into the proper language.
<locale> has the same meaning as described in the
default locale section i.e. if LANG_LIST
property contains language definition string
ru_RU_CP866|IBM866:langs.ruslang, you must create file
psoft_config/langs/lang_ru_RU_CP866.properties
and translate it into Russian language with IBM866 encoding.
Fragment of psoft_config/masonry.properties file
...
LOCALE=en_US
ENCODING=ISO-8859-1
LANG_LIST=en_US|ISO-8859-1:langs.englang ru_RU_CP1251|windows-1251:langs.ruslang
...
Two files must exist with the config as shown above. One -
psoft_config/langs/lang.properties or
psoft_config/langs/lang_en_US.properties in English
language and in ISO-8859-1 encoding and the other one
psoft_config/langs/lang_ru_RU_CP1251.properties translated
into Russian language and in windows-1251 encoding.
Each of these files must contain the following two lines:
lang.englang=<eng_description>
lang.ruslang=<rus_description>
Fragment of psoft_config/langs/lang_en_US.properties file
...
lang.englang=English
lang.ruslang=Russian
...
Fragment of psoft_config/langs/lang_ru_RU_CP1251.properties file
...
lang.englang=Английский
lang.ruslang=Русский
...
|