Language selection based on ip address

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.
Locked
jennifereromi
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Apr 26, 2006 12:45 pm

Language selection based on ip address

Post by jennifereromi » Fri Sep 07, 2012 4:03 am

Hi everyone,

I was wondering if anyone knows how I can show different languages based visitors' ip addresses. I searched around the joomla files and cannot find the place where the language detection takes place. I searched the forum without much results either. I'd really appreciate if someone could point me to the right direction.

Thank you very much.
Jennifer

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language selection based on ip address

Post by infograf768 » Fri Sep 07, 2012 6:22 am

Joomla core (in multilanguage and with the parameter set in the languagefilter plugin) can look for the default Browser language and directs to this language the first time one displays the site, but not the IP address. This would need a specific extension.

The code looking for the browser language is JLanguageHelper::detectLanguage() in the languagefilter plugin.

One would have to override this with a new function to detect IPs, thus creating a new language filter plugin at this effect.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group


Locked

Return to “Language - Joomla! 2.5”