OJS3: Problems with translation

Good day.

I have done some changes in locale.xml file to make more full translation to my language. All worked fine. But after reinstallation of OJS3 and recopying locale.xml with translation to locale dir for my language the translation just don`t work.

Where may be the problem?

Additional information.

Reinstallation is required as I want to move OJS3 from HDD to SSD.
When I simply copy all OJS3 files (including my translation) to apache2 web directory from HDD css in web site appearance dont working but translation does. When I reinstall OJS3 and copy locale.xml file (which contains my translation) to apache2 web directory with the rewriting original file OJS just dont see it.

Vitaliy, if your language is Russian, would you share the translation, when it’s done? Thanks!

Nope. I am translating into Ukrainian. But I think Russian OJS user community is big. So it’s very unlikely that it will take a long time for valid Russian translation.

Right now I`m trying to change xml translation files once more. I have done a new installation and after it translation is working properly. The only deference from my previous attempt (as I see) is in PHP version. Problem appeared on PHP7 but not on PHP5.6

Hi @Vitaliy,

I suspect you have a file permission problem in your cache/ subdirectory. Check your permissions according to docs/README.

Regards,
Alec Smecher
Public Knowledge Project Team

Permissions were set accordingly.

Hi @Vitaliy,

Can you verify that a file appears in cache/ with a similar filename to the locale file you created? (Hash codes will be added to the name.) Check the contents to see if it appears to contain locale key mappings. If it’s nearly empty, you might want to try validating your XML in case there’s a typo. If it doesn’t appear, you might also need to check e.g. SELinux permissions.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, file appears in cache in both cases like fc-locale-… In fact there are a lot of such files.They really contain keys for my local language.

So I can`t understand why editing xml tranlsation files was working the second time on php5.6, but was not working the first time.

locale.xml were identical. Can`t it be problem with apache2 php7 module? this files work irrespectively from php?

Hi @Vitaliy,

Could you describe how you’re editing the files? Are you editing the .xml manually, and not seeing changes reflected when you go into the system, or are you using the translation plugin, or something else?

Regards,
Alec Smecher
Public Knowledge Project Team

Nope. I change them manually by gedit (default Ubuntu editor).
And yes, I haven`t seen any changes when was working with php7 module.
When I reinstalled with php5.6 changes appeared as I copied in locale dir the same xml file.

Hi @Vitaliy,

Can you try manually flushing the cache files out of your cache subdirectory to see whether and how they’re regenerated? OJS should automatically update the cache files when the .xml file is newer than the cache, but perhaps there’s an issue there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hmm.

Now while I reinstall with php5.6 module OJS xml translation works correctly. Problem seems to disappear. I will report if problem comes back. I found another issue, but I think it needs new topic.