How to fix translation on OJS 3? » Open Journal Theme

How to fix translation on OJS 3?

OJS have been used by many publisher around the world, this makes OJS is very unique since this platform as default support many language. This feature even allow any user of the journal that uses OJS platform to change the interface based on their language.

On OJS latest version 3.3 this feature even more improved by introduced 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 in 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 also useful if you as the native speaker know better translation rather than use the translated line offered by OJS. In this article, we will guide you on how to create or modify the translation of OJS.

1. 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 of locale file with their language code :

OJS uses ISO 639-1 to symbolize their 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 open the selected folder and edit 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 login 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 advanced code editor such as VScode to find the missing translation. After you have found it, add the respective translation and remove the language package on your OJS (as journal manager access Administration -> Site Settings and select the language menu) and reinstall it.

2. Modify the locale setting on OJS admin

This case frequently we encounter 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.

Example of the translation that does not depend on the XML or PO file

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 :

Select the Components left tab
Select Edit on selected Component it will open modal
On the click of the article you now can edit the better translation for the wrong locale translation.

After edit the needed line on the modal don’t forget to click Save!

3. Modify Others Translation Line

You may found that some other line does not change although you have done above step such as 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 query on your database to make collective change to the database because this line is saved on the the database. This may happen when you have upgraded your OJS and OJS will re-translate some line to the 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

Select the submission_file_settings table on your OJS database

Click the SQL tab on that table

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 translation on your OJS. You can also contribute to the OJS, OPS, OMP, or other PKP translation by accessing this link and select any incomplete locale file for the specific platform that you want :

Select any PKP platform to contribute on their translation.

By contributing this translation you also help other users and will be released by PKP team on the next OJS version release. You can read more detail about the translation contribution initiative here.

Let share any knowledge if you have any other way for translation the OJS or other platform.

Open Journal Theme

Professional Publishing system services OJS, OMP, Dspace, Eprints

Need More Services  or Question? started in 2016 by a passionate team that focused to provide affordable OJS, OMP,  OPS,  Dspace, Eprints products and services. Our mission to help publishers to be more focus on their content research rather than tackled by many technical OJS issues.

Under the legal company name :
Inovasi Informatik Sinergi Inc.

Secure Payment :

All the clients financial account data is stored in the respective third-party site (such as Paypal, Wise and Direct Payment).
Your financial account is guaranteed protected. We never keep any of the clients’ financial data.