I’ve run into a few problems with a site I’m trying to make available in different languages. It’s actually live now, and can be seen here.
I followed the Multi language site alternative method but without removing index.php from my urls.
I’m having two major problems, one of which I have already described in the code share corner, but there hasn’t been any help yet and I don’t know where else to turn.
First, I’m having an issue with the language switching code that is mentioned in the wiki. The given code is:
< script type="text/JavaScript">
<!--
function switchLanguage(lang) {
u = location.href.split('/');
u[3] = lang;
location.href = u.join('/');
}
//-->
< /script>with links that look like this:
<a href="/en/">EN</a> |
<a href="/fr/">FR</a>If you go to the site and navigate to an entry in english, then choose a different language, it will lead to a 404 because index.php is not included in the url. So, it shows “site.com/country_code/template_group/etc…” rather than “site.com/country_code/index.php/template_group/etc…”
Another issue I’m having is that {comment_url_title_auto_path} is not adding the country_code in between the domain name and index.php. So, any links using {comment_url_title_auto_path} will lead to the default english version, regardless of the language the user is viewing the site in.
If I could get some help with these issues I’d really appreciate it. The site is live unfortunately, with all of these bugs. Thankfully the target audience is forgiving, but I need to resolve these issues asap, in order to move forward with other development.