This document describes the process of adding a new language to the
Campcaster Studio localization. It is written for developers.
Introduction
Campcaster Studio (a.k.a. the C++ GUI) uses IBM’s
ICU
library for localization. This library supports a fallback mechanism:
if the locale is set to es_GT (Guatemalan Spanish), it first tries to
read the es_GT table for localized strings; if there is no such table,
it tries the es table; and if that is missing, too, it reads the
root table.
These tables are stored as UTF-8 text files (with Unix line breaks, i.e., a
single 0x0A character at the end of each line) in the
products/gLiveSupport/var directory with a txt
extension: e.g., es_GT.txt.
Before these files can be used by the program, they need to be converted into
binary resource bundle files using ICU’s genrb program
(which is in usr/bin, and is called by the Makefile).
Modifying an existing language
Edit the text file (e.g.,
products/gLiveSupport/var/es_GT.txt).
Run make in products/gLiveSupport.
Adding a new language
Add the new text file to products/gLiveSupport/var.
(See the
ICU
user guide for the format of this file.)
The first row of the file should be the locale name, followed by
“:table”. The locale name is of the form
<language-code>[[_<country-code>]_<variant>],
where
<language-code> is the
ISO 639-1
2-letter language code in lowercase,
the optional <country-code> is the
ISO 3166-1
2-letter country code in uppercase, and
the optional <variant> is the variant
(usually EURO or CYRILLIC) in uppercase.
Note that this is slightly different from the normal ISO standard:
ICU uses it_IT_EURO where the standard would be it_IT@euro.
Make sure the file is in UTF-8 encoding, has Unix line breaks,
and does not have a
BOM
character at the beginning.
The file name should be the locale name, followed by “.txt”.
Add a new line for the new language in each of the files
campcaster-studio.xml
campcaster-studio.xml.template
campcaster-studio.xml.user-template
Makefile.in
in the products/gLiveSupport/etc directory.
Run configure --prefix=... and then
make clean all
in the products/gLiveSupport directory.