Detection of browser language setting not working?

General questions regarding the use of languages in Joomla! 2.5.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Detection of browser language setting not working?

Post by infograf768 » Sun Jun 10, 2012 7:32 am

The demo site uses the non-corrected file, thus the wrong behavior.

The multilang feature is designed to post a cookie so that users who left the site on a specific language (which is considered as their language of choice) will be the same when going to the site again.

I guess you could try to hack this by commenting both lines in languagefilter.php

Code: Select all

// setcookie(JApplication::getHash('language'), $lang_code, time() + 365 * 86400, $cookie_path, $cookie_domain);
This at your own risk. Also it will be overriden when updating to Joomla 2.5.5
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

alin09ro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Aug 16, 2011 5:23 pm

Re: Detection of browser language setting not working?

Post by alin09ro » Sun Jun 10, 2012 7:59 am

I tried to comment the indicated lines (there are 3 in the file) but after this the home & logo problem appears.

I even tried with the old languagefilter.php file & commented out the setcookie lines but still no success.

Can you PM me the languagefilter.php file from the demo site? That site works exactly like I want.

Thanks.

Alin

alin09ro
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Aug 16, 2011 5:23 pm

Re: Detection of browser language setting not working?

Post by alin09ro » Sun Jun 10, 2012 10:52 am

I found a fix.

to always open the site in the default language replace "time() + 365 * 86400" with "0"

this way the cookie file is deleted when the browser is closed.


Locked

Return to “Language - Joomla! 2.5”