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_USdirectory and rename it into the name of your locale. Its name must be of typelg_COwhere:lgis the ISO 639 standard definition for your language. A list is available in the Gettext manual.COis the ISO 3166 standard definition for your country. A list is available in the Gettext manual.
- Translate each
.txtfiles. - Edit the
biborb.pofile and translate each string starting withmsgstr. For instance:
Original File:msgid "Update" msgstr ""Localized File:msgid "Update" msgstr "Mettre à jour" - Compile the
biborb.pofile.msgfmt -o biborb.mo biborb.poDue to some problems in correctly setting up i18n and PHP, PHP gettext methods are not called. Only the translation file (.po) suffices to localize BibORB. - Edit the
config.phpfile and set the$languagevariable 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_selectiontoTRUE. - If the localization doesn't show, restart the web server to force it to reload the localization data.
biborb.jsalso contains strings to be translated.- 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 :).