
publish language switcher module somewhere.enable " System - Language Filter" plugin, set "Remove URL Language Code" to YES, set "Language Selection for new Visitors" to "Site Language".Please scroll to ISSUE RESOLUTION below if you just need a solution. Still - waiting for some inside Joomla fix, this is just a guerilla approach -). Maybe someone would think of a much cleaner way to sort this out, but this works for me -).

Make a new rule with the following settings:Īll the links redirect flawlessly and language is changed properly. For that to work, I use the Joomla Redirects - as it handles the language change properly. In this stage, clicking on the Language Switcher in the site home / root directory '/' would give a 404 error - because it's excluded by the forementioned RewriteCond. The rule has an exception - not to include the specific "/xx/" URI - which after rewrite should point to the root directory link '/', but it doesn't work that way - if there is no RewriteCond exception - clicking on the Language Switcher in the site home / root directory '/' won't change the language from other to the default site content language, it will stay on the other currently set. It rewrites the "/xx/ " part of the URI to "/" so it fixes the problem while viewing an article in some other language and switching to default site content language using Language Switcher. htaccess in the Custom redirects section (before SEF): RewriteCond % !^/xx/$ I use the Joomla default Language Switcher set to: X-default Language - Default frontend language Language Selection for new Visitors - Browser Settings System - Language Filter plugin enabled with the following settings: System - SEF plugin enabled with the following settings:
#Language switcher module joomla 3 code
IN ALL THE LINES BELOW xx is your DEFAULT SITE CONTENT LANGUAGE CODE - for example en for English. WebServer - LiteSpeed V7.9 Cloudlinux 1.3 I had the same problem of not being able to switch to the default site content language from other languages (getting a 404 error) and found a WORKAROUND FIX for it. Maybe there is a problem with some PHP extensions? WebServer to PHP Interface: apache2handler Is anyone needs more details to examine this issue? Maybe such problem can occur in another hostings too.īut what is strange is that mod_rewrite is not in use and htaccess file even not renamed (which could impact on server). So, the sites are identical on the localhost and at the hosting. I even switched to PHP 7.4 and the hosting and mod_rewrite is still not used. Then I made copy of the website that has this issue on my hosting via Akeeba and launched its copy at the localhost and it works fine again. There is PHP 8.0.3 and no mod_rewrite is in use at the hosting where this issue exist. I made a clean installation on the localhost (PHP 7.4) and repeated all actions - no such issue, all is fine. Watch the screencast video showing this issue in action.īUT! If I disable 'Remove URL Language Code' param in the plugin settings, all works fine.

No errors in server error.log and in Joomla error.log this leads to "The requested page can't be found'. I see that URLs in the language switcher module are incorrect. The problem is when I attempting to switch between languages. Then create two menu modules and language switcher. I create single article > select the right article, assign the language and save it as default home page for those language. Create two articles.Ĭreate two additional menus: Top menu RUS and Top menu ENG and there is core Main menu with the default menu item which is set to all languages. Then create two categories and assign Russian and English to these categories. Take attention: the param Remove URL Language Code is enabled! Go to plugins > system - language filter and enable its settings and the plugin itself. I've installed Russian and there is English-GB as the default.
#Language switcher module joomla 3 install
Install any additional language and create multilingual content.
