Setting a default language and adding optional languages

OILSWebLocale adds support for a specific language. Add this variable to the Virtual Host section in /etc/apache2/eg_vhost.conf.

OILSWebDefaultLocale specifies which locale to display when a user lands on a page in TPAC and has not chosen a different locale from the TPAC locale picker. The following example shows the fr_ca locale being added to the locale picker and being set as the default locale:

PerlAddVar OILSWebLocale "fr_ca"
PerlAddVar OILSWebLocale "/openils/var/data/locale/opac/fr-CA.po"
PerlAddVar OILSWebDefaultLocale "fr-CA"

Below is a table of the currently supported languages packaged with Evergreen:

Language Code PO file

Arabic - Jordan

ar_jo

/openils/var/data/locale/opac/ar-JO.po

Armenian

hy_am

/openils/var/data/locale/opac/hy-AM.po

Czech

cs_cz

/openils/var/data/locale/opac/cs-CZ.po

English - Canada

en_ca

/openils/var/data/locale/opac/en-CA.po

English - Great Britain

en_gb

/openils/var/data/locale/opac/en-GB.po

*English - United States

en_us

not applicable

French - Canada

fr_ca

/openils/var/data/locale/opac/fr-CA.po

Portuguese - Brazil

pt_br

/openils/var/data/locale/opac/pt-BR.po

Spanish

es_es

/openils/var/data/locale/opac/es-ES.po

*American English is built into Evergreen so you do not need to set up this language and there are no PO files.

Updating translations in Evergreen using current translations from Launchpad

Due to Evergreen release workflow/schedule, some language strings may already have been translated in Launchpad, but are not yet packaged with Evergreen. In such cases, it is possible to manually replace the PO file in Evergreen with an up-to-date PO file downloaded from Launchpad.

  1. Visit the Evergreen translation site in Launchpad
  2. Select required language (e.g. Czech or Spanish)
  3. Open the tpac template and then select option Download translation. Note: to be able to download the translation file you need to be logged in to Launchpad.
  4. Select PO format and submit the request for download button. You can also request for download of all existitng templates and languages at once, see https://translations.launchpad.net/evergreen/master/+export. The download link will be sent You to email address provided.
  5. Download the file and name it according to the language used (e.g., cs-CZ.po for Czech or es-ES.po for Spanish)
  6. Copy the downloaded file to /openils/var/template/data/locale. It is a good practice to backup the original PO file before.
  7. Be sure that the desired language is set as default, using the Default language procedures.

Analogously, to update the web staff client translations, download the translation template webstaff and copy it to openils/var/template/data/locale/staff.

Changes require web server reload to take effect. As root run the command

service apache2 restart