Page Content Does Not Change When Switching Language

I am experiencing an issue with language switching in my OJS-based journal, MetaScience: Journal of the History and Philosophy of Science. metasciencehps.org
Issue Description:
When a primary locale (e.g., English) is set, certain pages always load in that language, even after selecting a different language.
The language switch button is visible and clickable, but the page content does not update accordingly.
The URL does not change, and secondary language content (Turkish) is not loaded.

Affected Pages:
About the Journal
Editorial Team
Submissions
Other pages (e.g., article lists, issue archives) work as expected, and the language switch functions properly on them.

What I Have Tried So Far (But the Issue Persists):
Cleared the cache and reset the language settings.

Disabled and re-enabled English and Turkish under Settings > Website > Languages.
Cleared OJS cache and browser cookies.
Checked config.inc.php settings to ensure correct language and URL settings.

restful_urls = Off
disable_path_info = Off
session_check_ip = Off
Switched to the default OJS theme (Default Theme).

The issue persisted; the affected pages still remained in the primary locale.

My Request:
Why are these specific pages not updating their content when switching the language?
Is this an issue with OJS’s language switching mechanism?
Are there any recommended configurations or fixes to resolve this issue?
Any help or guidance on this issue would be greatly appreciated.

Thank you in advance!

Hi @alper,

I was unable to reproduce this error - it worked fine for me to swap between English and Turkish on your site without any issue. I tested on Safari, Firefox, and Brave browsers on Mac OS - I wonder if this is an issue with your browser? Or if someone else can confirm that they can reproduce this issue.

And, just a note when posting here on the forum to indicate your OJS version number (e.g. 3.4.0-8) in your posts, please.

-Roger
PKP Team

Hi Roger,

First of all, thanks for testing the language switch function on different browsers and operating systems. After clearing the caches on the hosting side, the language switching worked fine for a while, but the issue reappeared after a few uses. I have tested this on different browsers and computers, and the problem persists.

I have specifically noticed this issue on the “About the Journal,” “Editorial Team,” and “Submissions” pages. If you try again now, you will likely see that the issue persists since you tested it right after I cleared the cache.

I’d appreciate any further suggestions or insights on this issue.

Best,

Hi @alper,

Thanks for following up. Yes - I can see this is the case now, and on those pages it is.
How do you have the content entered in both locales on your site? I wonder if the issue is coming from the editorial dashboard where you have this content entered. Perhaps you could share a screenshot for the “About the Journal” Page from the administrator’s view?

-Roger

Hi,

I enter the site content separately in English and Turkish. I’m sharing the screenshot with you.


Hi @alper,

I see what you mean. This looks exactly like it ought to, so that leads me to suspect that something might be going on behind-the-scenes on your server. Are you able to check PHP error log messages? That might provide more clues as to what the issue is.

-Roger
PKP Team

Hi all,

Just to note that there is a similar issue here:

I haven’t been able to track down the cause, but it appears to be affected by hard-to-reproduce conditions – such as the order in which multiple requests arrive at the server. This is probably why I haven’t been able to reproduce the issue locally.

However, we are changing our approach to languages in accordance with best practices, starting with OJS/OMP/OPS 3.5.0 (due for release fairly soon, and slated to become the next LTS line of releases). Starting with these, the language will become part of the URL, and we will not rely on cookies to track the user’s current language. This change is mostly made to improve search engine indexing of multilingual content, but I suspect it will resolve this issue in the process.

I would suggest watching for the final 3.5.0 release to come available in the next couple of months, and considering an upgrade.

Regards,
Alec Smecher
Public Knowledge Project Team

3 Likes

I have the same issue in www.politikon.online, running on 3.4.0.8
When the new approach in 3.5.0 is installed, will the existing language versions remain in effect?
Thank you!
Tibor Purger
Rutgers University

Hi @tpurger,

Yes, existing languages will be present, and your old URLs will also continue to work.

Thanks,
Alec Smecher
Public Knowledge Project Team

1 Like