Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Elxis documentation
for users and developers.
Home
Help
Login
Register
Elxis CMS Forum
»
Extensions
»
Bots and plugins
»
How to set a default value in the contact form of country field by languages ?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to set a default value in the contact form of country field by languages ? (Read 8494 times)
chongbing
Full Member
Posts: 137
How to set a default value in the contact form of country field by languages ?
«
on:
October 12, 2015, 02:18:26 »
Hi datahell,
How to set a default value in the contact form of country field by languages ? Such as,
Contact form
English:
Country -> United States
Simplified Chinese:
Country -> China
Traditional Chinese:
Country -> Taiwan
Many thanks,
Logged
Make it a better world,
https://EasyApps.Biz
datahell
Elxis Team
Hero Member
Posts: 10356
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #1 on:
October 12, 2015, 11:15:03 »
Contact form already works like that...
It uses the
REGION
information of Elxis language database file. English language is mapped to US. Chinese simplified/Hans (zh) is mapped to China (CN). Chinese traditional (zt) is also mapped to China (CN).
'zh' => array('LANGUAGE' => 'zh', 'REGION' => 'CN', 'DIR' => 'ltr', 'NAME' => '中文', 'NAME_ENG' => 'Chinese'),
'zt' => array('LANGUAGE' => 'zt', 'REGION' => 'CN', 'DIR' => 'ltr', 'NAME' => '普通话', 'NAME_ENG' => 'Chinese traditional'),
You can change these mappings (eg zt to TW) by modifying this file:
includes/libraries/elxis/language/langdb.php
Multilingual files for country names are located here:
includes/libraries/elxis/form/
countries.en.php, countries.el.php, countries.it.php, etc...
«
Last Edit: October 12, 2015, 11:19:55 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
chongbing
Full Member
Posts: 137
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #2 on:
October 13, 2015, 12:45:13 »
OK, Thanks datahell,
I want to re-correct the "Chinese" as below, It's official ! Thanks !
'zh' => array('LANGUAGE' => 'zh', 'REGION' => 'CN', 'DIR' => 'ltr', 'NAME' => '简体中文', 'NAME_ENG' => 'Chinese'),
'zt' => array('LANGUAGE' => 'zt', 'REGION' => 'CN', 'DIR' => 'ltr', 'NAME' => '繁體中文', 'NAME_ENG' => 'Chinese traditional'),
Logged
Make it a better world,
https://EasyApps.Biz
chongbing
Full Member
Posts: 137
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #3 on:
October 13, 2015, 13:08:03 »
Hi datahell,
But ...
Chinese simplified/Hans (zh) is mapped to China (CN). -> Correct ! Which means 'CN' => '中國',
Chinese traditional (zt) is also mapped to China (CN). -> It should be "Taiwan" Which means 'TW' => '台灣', How to set it as default country name in the contact form when user is access Chinese traditional webpage?
Many thanks,
Logged
Make it a better world,
https://EasyApps.Biz
datahell
Elxis Team
Hero Member
Posts: 10356
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #4 on:
October 13, 2015, 20:30:10 »
I told you what to change and fix it. I didn't knew that traditional Chinese are spoken only to Taiwan. I will change that to Elxis. I also think that Taiwan is part of China now, isn't it???
My Chinese are as good as your Greek
«
Last Edit: October 13, 2015, 20:33:24 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
chongbing
Full Member
Posts: 137
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #5 on:
October 14, 2015, 06:23:05 »
Traditional Chinese is used in Taiwan, Hong Kong and some others countries except China. Traditional Chinese and Simplified Chinese are almost the same when people speak, but different in writting. Even though, people can read it if they are Chinese.
BTW, Taiwan is not a part of China so far. As you know, it's a political issue, but i'm not a politician.
My Chinese are as good as your Greek ->
You can say that again
Thanks datahell.
«
Last Edit: October 14, 2015, 15:05:06 by chongbing
»
Logged
Make it a better world,
https://EasyApps.Biz
chongbing
Full Member
Posts: 137
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #6 on:
October 14, 2015, 13:29:14 »
Hi datahell,
Sorry, I miss this you said that as below. It works now. Thank you again.
You can change these mappings (eg zt to TW) by modifying this file:
includes/libraries/elxis/language/langdb.php
Logged
Make it a better world,
https://EasyApps.Biz
datahell
Elxis Team
Hero Member
Posts: 10356
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #7 on:
October 14, 2015, 18:50:06 »
I did this change because I think it reflects better the language location, regardless if Taiwan is an independent country or not. So Chinese Traditional (zt) mapped to Taiwan (TW). Regarding Taiwan status I am not so sure but it is not a matter to discuss here. I am not a politician too. Except if it was a Greek related issue. In that case all Greeks are politicians
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
chongbing
Full Member
Posts: 137
Re: How to set a default value in the contact form of country field by languages ?
«
Reply #8 on:
October 15, 2015, 02:28:29 »
Yea, understand. Sometimes we can see your country news on our TV here.
Hope you guys are doing very well.
Logged
Make it a better world,
https://EasyApps.Biz
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Extensions
»
Bots and plugins
»
How to set a default value in the contact form of country field by languages ?