Internationalization
Gettext methods are used to provide the localization of BibORB.
The locale
directory contains localized data used to display messages in a selected language. By default, english is used (en_US
directory) if data are missing for a given language.
If you want to add the support for a language:
- Copy the
en_US
directory and rename it into the name of your locale. Its name must be of typelg_CO
where:lg
is the ISO 639 standard definition for your language. A list is available in the Gettext manual.CO
is the ISO 3166 standard definition for your country. A list is available in the Gettext manual.
- Translate each
.txt
files. - Edit the
biborb.po
file and translate each string starting withmsgstr
. For instance:
Original File:msgid "Update" msgstr ""
Localized File:msgid "Update" msgstr "Mettre à jour"
- Compile the
biborb.po
file.msgfmt -o biborb.mo biborb.po
- Edit the
config.php
file and set the$language
variable to the name of your locale (if you want it to be selected by default) or select it within BibORB if you have set$display_language_selection
toTRUE
. - If the localization doesn't show, restart the web server to force it to reload the localization data.
- If everything is OK, you could send me an archive of your newly created locale directory, I will add it to future releases of BibORB :).