Languages and Localization
Enabling and Disabling Languages
Evergreen 1.6 is bundled with support for a number of languages beyond American English (en-US). The translated interfaces are
split between static files that are automatically installed with Evergreen, and dynamic labels that can be stored in the Evergreen database. Evergreen is
installed with additional SQL files that contain translated dynamic labels for a number of languages, and to make the set of translated labels available in
all interfaces. Only a few steps are required to enable or disable one or more languages.
Enabling a Localization
languagesenabling a localization
To enable the translated labels for a given language to display in Evergreen, just populate the database with the translated labels and enable the localization. The
following example illustrates how to enable Canadian French (fr-CA) support in the database. These same steps can be used with any of the
languages bundled with Evergreen, or you can create and add your own localization.
The translated labels for each locale are stored in SQL files named "950.data.seed-values-xx-YY.sql" where "xx-YY" represents the locale code for
the translation. Load the translated labels into the Evergreen database using the command psql, substituting your user, host and
database connection information accordingly:
-h -d \
-f /path/to/Evergreen-source/Open-ILS/src/sql/Pg/950.data.seed-values-fr-CA.sql
]]>
Ensure the locale is enabled in the Evergreen database by using the utility psql to check for the existence of the locale in the
table config.i18n_locale:
SELECT code, marc_code, name, description
FROM config.i18n_locale
WHERE code = 'fr-CA';
As shown in the following example, if one row of output is returned, then the locale is already enabled:
code | marc_code | name | description
------+-----------+-----------------+-----------------
fr-CA | fre | French (Canada) | Canadian French
(1 row)
If zero rows of output are returned, then the locale is not enabled:
code | marc_code | name | description
------+-----------+------+-------------
(0 rows)
To enable a locale, use psql to insert a row into the table config.i18n_locale as follows:
INSERT INTO config.i18n_locale (code, marc_code, name, description)
VALUES ('fr-CA', 'fre', 'French (Canada)', 'Canadian French');
Disabling a Localization
languagesdisabling a localization
You might not want to offer all of the localizations that are preconfigured in Evergreen. If you choose to disable the dynamic labels for a locale, just delete those
entries from the table config.i18n_locale using the psql utility:
DELETE FROM config.i18n_locale
WHERE code = 'fr-CA';