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.
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.
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
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';
code | marc_code | name | description -------+-----------+-----------------+----------------- fr-CA | fre | French (Canada) | Canadian French (1 row)
code | marc_code | name | description ------+-----------+------+------------- (0 rows)
To enable your locale, use
psql insert a row into the
config.i18n_locale table as follows:
INSERT INTO config.i18n_locale (code, marc_code, name, description) VALUES ('fr-CA', 'fre', 'French (Canada)', 'Canadian French');
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';