OJS and OCS are multilingual systems, allowing journals and conferences to publish in a variety of languages. The Public Knowledge Project aims to support English, French, Spanish and Portuguese translations for both OJS and OCS. In addition, translations of both software packages have been completed by the community, and we welcome contributions at any time.
All text you see in a typical fresh OxS interface has been abstracted from the system code, and has in fact been retrieved from one of a number of XML locale files. These files can be found in folders using appropriate ISO locale codes (the Language Code Listing followed by the Country Code Listing), for example en_US for American English, or pt_BR for Brazilian Portuguese. This document will use en_US for its examples.
These locale directories will typically have XML files containing lists of message keys written in them: these message keys and their corresponding values correspond to template lines in the system code itself. The following set of message keys are taken from locale/en_US/locale.xml:
<message key="navigation.journalHelp">Journal Help</message> <message key="navigation.home">Home</message> <message key="navigation.about">About</message> <message key="navigation.userHome">User Home</message> <message key="navigation.login">Log In</message> <message key="navigation.register">Register</message>
When the system needs to display a piece of text, it first determines which language should be displayed. The first place it checks is to see which language has been set as the site-wide default by the Site Administrator. If the user is currently looking at a journal, the system instead checks to see which language the Journal Manager has set as the default. And finally, if multiple languages have been installed it checks to see if the user has specified another language to be used instead of the default. More information on administering languages can be found in the section on checking language availability.
Once the system knows which language to display to the user it grabs the message key value from the locale file that belongs to that specific translation: that is, if it needs to display the text relevant to message key="navigation.journalHelp" from the above example, and knows that it should display this in English, it will look in locale/en_US/locale.xml for the appropriate key value, in this case "Journal Help". If the message key doesn't exist (if the locale file is missing that particular key, or doesn't exist on the system in the first place), the system will display the raw message key surrounded by hash marks:
If you ever see that kind of code on an OJS or OCS page, you know that the translation is incomplete. You can take a look at the section on translating to see how to complete it.
Checking Language Availability
You are advised to first check which languages are available from your version of OCS or OJS. If the language you want isn't listed, then check our website for availability.
Checking Your Software for Available Languages
The first place to check on language availability is from within the software installation itself.
For both OJS and OCS: If you have System Administrator access, log in and go to the System Administrator User Home, and click the Languages link, which will take you to the site-wide languages administration page. This page has two main sections:
- Under Language Settings you will find a drop-down box for your Primary Locale: this sets the default language across the entire site; users will be presented with this language by default, until they change their own language preference.
You will also see a list of supported locales, with checkboxes next to them. The selected locales will be available for use by all journals hosted on the site, and will also appear in a language select menu on each site page (which can be overridden on journal-specific pages). If multiple locales are not selected, the language toggle menu will not appear and extended language settings will not be available to journals.
- Under Manage Locales you will find a list of installed locales, as well as a list of new locales that haven't been installed.
Beside each installed locale you will see: a link to reload locale, useful if you have made any changes to any locale files; and a link to uninstall locale, which will not remove locale files from your server but will remove them from the list of supported locales.
At the very bottom, beside each locale that hasn't yet been installed, you will see a checkbox. To install a language, check the box next to its name and click Install. The page will reload and the locale will appear under Manage Locales.
If a language is listed as available and installed from the Site Administrator's Languages administration page, you will still have to enable it for your journal or conference for it to be available to users. Log in as a Journal Manager or Conference Manager, and from your User Home click on Languages to visit the journal- or conference-specific language administration page. Here you will be able to set the primary locale for your journal or conference, and likewise enable supported languages to be used journal- or conference-wide. If you enable more than one language, users will be able to toggle between them via a drop-down menu on the sidebar.
Checking the PKP Website for Available Languages
The PKP keeps an up-to-date list of languages and contributors from the relevant project page.
Information is organized in a table, with the software version along the X axis and the list of languages on the Y axis. Clicking on a language name will take you to an individual language page, which will list the most recent contributors, and any other relevant information.
All languages fall into the following categories:
- Complete: either bundled with that particular version of OCS or OJS, or are otherwise available for download from the list. You can find instructions for installing downloaded language packs here.
- Needs Updating: these files may be included with the version you are using (the table will indicate this) but incomplete for some reason (they may be a version out of date but still relevant enough to be useful; or they may not have been 100% translated in the first place). If they are listed as not being included with the software version you are using, you can contact the last known maintainers to see if they have any recent files. You can also undertake the translation yourself, with instructions available here.
If you don't see the language(s) you are looking for listed on either of these lists, please consider undertaking the translation yourself. If you are interested in contributing in such a way, contact us for advice, or consult the rest of this document.