Table of Contents
Enabling and disabling localizations in Evergreen 1.4
As of Evergreen 1.4, support for a number of languages beyond American English (en-US) is bundled with each release of Evergreen. The translated interfaces are split between static files that are installed with Evergreen and require no effort to enable on your part, and dynamic labels that can be stored in the Evergreen database. Evergreen ships SQL files that contain translated dynamic labels for a number of languages, and to make the set of translated labels available in all interfaces there are a few steps that you must follow. In addition, to disable one or more languages, there are a few steps that you must follow.
Enabling a localization in Evergreen 1.4
To enable the translated labels for a given language to display in Evergreen 1.4, you need to populate the database with the translated labels and enable that localization in the Evergreen database. For our example, we will assume that you want to enable Canadian French (fr-CA) support in the database. You can reproduce these steps with any of the languages bundled with Evergreen, or create your own localization and add it.
- 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
psqlcommand, substituting your database connection information accordingly:
psql -U <username> -h <hostname> -d <database> -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. Connect to the database using the
psqlutility and check for the existence of the locale in the
SELECT code, marc_code, name, description FROM config.i18n_locale WHERE code = 'fr-CA';
- If you get one row of output similar to the following, then your locale is already enabled:
code | marc_code | name | description -------+-----------+-----------------+----------------- fr-CA | fre | French (Canada) | Canadian French (1 row)
- On the other hand, if you get zero rows of output as follows, then you will need to enable your locale.
code | marc_code | name | description ------+-----------+------+------------- (0 rows)
To enable your locale, use
psqlinsert a row into the
config.i18n_localetable as follows:
INSERT INTO config.i18n_locale (code, marc_code, name, description) VALUES ('fr-CA', 'fre', 'French (Canada)', 'Canadian French');
Disabling a localization in Evergreen 1.4
You might not want to offer all of the localizations that come preconfigured for Evergreen. If you choose to disable the dynamic labels for a locale, you simply need to delete it from the
config.i18n_locale table using the
DELETE FROM config.i18n_locale WHERE code = 'fr-CA';