Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Can't set Default language to zh-CN for the visitors from China and HK

Can't set Default language to zh-CN for the visitors from China and HK

Hello!

We are using Falang for our multilingual website - betconstruct.com

Currently we have create a new language in Joomla and want to set that language as default for those who enter fron China or Hong Kong.

I have read the docs and have done several tests but with no luck!

Please help us with this!

Best,
Gev.

balgev
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Can't set Default language to zh-CN for the visitors from China and HK

any help?

balgev
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Can't set Default language to zh-CN for the visitors from China and HK

Hi, sorry this has taken a while. I have recreated a typical environment for this with Falang and it seems to work ok. Here's my setup:

1 - installed Falang
2 - installed zh-CN and zh-TW language packs
3 - created content languages for zh-TW and zh-CN with prefixes zh-tw and zh-cn
4 - published the Falang language switcher module
5 - ensure that the "System - FaLang Database Driver" plugin is ABOVE the following plugins: "System - Language Filter", "System - Chameleon" and "System - Chameleon Actions"
6 - Do a quick test on the front end to ensure that clicking on the language icons changes the front-end language
Now some steps to set up Chameleon to switch language for HK and CN:
7 - go into Components->Chameleon->Configuration
8 - click on "Download latest Geolite2 Country Database" (and OK)
9 - go into Components->Chameleon->Rules
10 - create a new rule and name it "Switch for HK and CN"
11 - in the Config tab set "Enable GeoIP/GeoCity" to "Geolite2 Country"
12 - in the Quick Rules tab, set "Only these countries" to "cn,hk" (without the quotes but with the comma)
13 - in the Actions tab, in the Succeed Action (left column) scroll down to to the Language dropdown and set it to 中文(简体)
14 - save the rule and test.

Now I expect in your setup you may not need the zh-TW language pack, but I just did that for testing to make sure it would not get the 2 language packs confused.

Common errors:
a - missing step 11
b - trying to put the language codes into the "Preferred list of languages" box in the Config tab. That's not what it's used for. Don't put them there.
c - not having the system Falang database plugin in the right order.

I hope that will work for you - please let me know if you continue to have any problems with it.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: Can't set Default language to zh-CN for the visitors from China and HK

hi follow all your steps, i have no success. my website is localhost, switch to english in my website frontend ,my ip is in china,then refresh my website page, the language didn't switch to chinese,what's the wrong, if you need i can move website online

linghun
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5910
Total Posts Today:
1
User Info:
 
Total Users:
10144
Newest User:
leonard5412396
Members Online:
2
Guests Online:
140


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked