OJS has been used by many publishers around the world, this makes OJS is very unique since this platform as default support many languages. This feature even allows any user of the journal that uses the OJS platform to change the interface based on their language.
In OJS latest version 3.3 this feature was even more improved by introducing the date format for any language that uses a specific national data format. In this version’s new additional languages added are Catalan, French (France), Macedonian, Norwegian, Polish, Portuguese (Portugal), Romanian, Slovak, and Vietnamese. This additional language enriches the multilingual ecosystem of the OJS system. So it will make more people interested and customize their journals based on the user globally. More information about the completeness of the translation can be found at this link.
However, although this platform provides many languages since the OJS developer not only focused on this one task for the translation activity, you may find some line that still gets untranslated marked by double hashtag character such as ##submission.title## . This is also useful if you as the native speaker know better translation rather than using the translated line offered by OJS. In this article, we will guide you on how to create or modify the translation of OJS.
Modify The Locale File #
Note :
OJS < 3.3 locale use the XML file
OJS >= 3.3 use the PO file as a locale file as default.
Open your OJS folder on your public_html or another folder that holds your OJS files and open the locale folder. In this folder you can find many locale files with their language code :
OJS uses ISO 639-1 to symbolize its language code. You can find the complete code of the countries here. For example pt_BR for Brazil language. You can edit each language by opening the selected folder and editing the locale file (PO or XML file) by modifying the correct translation. In this example, we will edit the PO file (OJS 3.3 use the PO file for the locale file).
Edit the correct translation by editing the msgstr inside the double quote save it and log in to your OJS as journal manager and clear the cache on your OJS so it will rebuild the translation based on your previous modification.
Tips: you can search and find using an advanced code editor such as VScode to find the missing translation. After you have found it, add the respective translation and remove the language pack on your OJS (as journal manager access Administration -> Site Settings and select the language menu) and reinstall it.
Modify the locale setting on the OJS admin #
This case is frequently encountered when we have upgraded any of our OJS clients, we find some line is not using the locale XML or PO file. The line when we try to find does not exist on that file. This once has made us confused about how to edit the error line since our team never find this on that locale file. We even add that error line on the locale file but it still does not work.
To edit this you should log in to the admin area as journal manager, access the Settings Menu -> Work Flow, and access the Submission Tab. Then click the Components option :
After editing, the needed line on the modal. Don’t forget to click Save!
3. Modify Others Translation Line #
You may find that some other line does not change although you have done the above step such as on our experience we find on the article data some line will still show something like ##default.genres.article## on the article tab.
To fix this, it will need to run a query on your database to make a collective change to the database because this line is saved on the database. This may happen when you have upgraded your OJS and OJS will re-translate some lines to their default line.
Attention before running this query please backup your OJS database. We will not take any responsibility if you have made any mistake that will make your OJS data corrupted.
1. Open the database editor on your server such as phpMyAdmin
2. Select the database of your OJS
3. Run this Query (remember to back up your database before running this query)
UPDATE `submission_file_settings` SET `setting_value` = REPLACE(`setting_value` ,'##default.genres.article##','PROPER_LINE') WHERE locale = 'id_ID';
Change the PROPER_LINE with the right language line for changing the ##default.genres.article##.
We have explained some information for changing incorrect language translations on your OJS. You can also contribute to the OJS, OPS, OMP, or other PKP translation by accessing this link and selecting any incomplete locale file for the specific platform that you want :
By contributing this translation you also help other users and will be released by the PKP team on the next OJS version release. You can read more detail about the translation contribution initiative here.
Let’s share any knowledge if you have any other way to translate the OJS or other platforms.