That strikes me as very strange if you got Simplified Chinese using IE and that accept language header.
Also if it is common for various countries that speak a form of Chinese to also include standalone "zh" in their accept language headers, then we have a problem. But if that is true, then I am very confused why this is the first time I've heard of it being a problem. Would you mind filing a bug report on https://bugs.php.net and classify it as "Website problem" and include this information we have been discussing? -Hannes On Wed, Dec 4, 2013 at 7:59 PM, Ray Wang <[email protected]> wrote: > I use this page(http://tw1.php.net/function.strtok) for testing and > wiresharp for capturing header. > All of the testing are under windows 7. Some of the page tested an private > browsing mode > for preventing the effect of cookie. > > IE 11 > Accept-Language: zh-TW\r\n > > FF 25.0.1(private browsing) > Accept-Language: zh-tw,zh;q=0.8,en-us;q=0.5,en;q=0.3\r\n > > chrome 31.0.1650.57 (private browsing) > Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4\r\n > > opera 18.0.1284.49 > Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4\r\n > > However, all of the browsers was directed to Simplified Chinese(even if IE > 11 > sent "zh-TW" only). > I think if I chosen the Traditional Chinese at window, browser would send > both "zh" and "zh-tw". > > > > 2013/12/5 Hannes Magnusson <[email protected]> >> >> That is a very good pseudo code for how it works. >> >> What I don't understand is why you are sending accept language headers >> for 'zh' when it clearly is not a Taiwanese language code. >> Is this a normal accept header that is sent on multiple of browsers >> you have tested on multiple systems? >> >> >> -Hannes >> >> >> On Wed, Dec 4, 2013 at 6:44 PM, Ray Wang <[email protected]> wrote: >> > I apology that misusing the word of "set default". >> > This make you misunderstand what I mean. >> > My English is so bad, sorry about that. >> > >> > if(isset($_cookie('selectedLanguage')))//if the user had chosen it >> > language >> > last time >> > { >> > //php.net would use the selected language saved in cookie >> > } >> > else if("zh" or "zh-cn" exist in ACCEPT_LANGUAGE)//if there is no value >> > existing in cookie >> > { >> > //php.net would use Simplified Chinese for this user >> > } >> > . >> > . >> > . >> > else >> > { >> > //php.net would use English for this user >> > } >> > >> > I think this is the mechanism that choosing language for a user. >> > What I ask is whether if you can make this line >> > >> > else if("zh" or "zh-cn" exist in ACCEPT_LANGUAGE) >> > { >> > //php.net would use Simplified Chinese for this user >> > } >> > >> > to delete the option of "zh" and become >> > >> > else if("zh-cn" exist in ACCEPT_LANGUAGE) >> > { >> > //php.net would use Simplified Chinese for this user >> > } >> > >> > I apology for misusage of words "set default" and the mechanism of >> > cookie of >> > language is work fine. >> > >> > Sincerely, Ray. >> > >> > >> > >> > 2013/12/5 Hannes Magnusson <[email protected]> >> >> >> >> We do not set the default language to Simplified Chinese for Taiwanese. >> >> >> >> Setting the default language requires you to do so, either implicitly >> >> by accept headers, or explicitly by click on simplified Chinese links >> >> as I previously explained. >> >> >> >> This has been the case for the last 12+ years. Noone has ever >> >> complained before so I believe you set this explicitly, although you >> >> may not have realized it. >> >> >> >> I am trying to help you and explain this to you, but you need to >> >> answer my questions fully. >> >> >> >> -Hannes >> >> >> >> >> >> On Wed, Dec 4, 2013 at 1:36 AM, Ray Wang <[email protected]> wrote: >> >> > I just want php.net not setting the default language as Simplified >> >> > Chinese >> >> > for Taiwanese. >> >> > zh-tw and zh-cn are not the same. Not only the words, but also these >> >> > are >> >> > two >> >> > different conutry. >> >> > Can you help us? >> >> > >> >> > Sincerely, Ray. >> >> > >> >> > >> >> > 2013/12/4 Hannes Magnusson <[email protected]> >> >> >> >> >> >> And you have no cookies in your browser for the php.net domain? >> >> >> >> >> >> -Hannes >> >> >> >> >> >> On Tue, Dec 3, 2013 at 9:22 PM, Ray Wang <[email protected]> wrote: >> >> >> > The accept-Language got from wireshark is as follow: >> >> >> > Accept-Language: zh-tw,zh;q=0.8,en-us;q=0.5,en;q=0.3\r\n >> >> >> > >> >> >> > If I look up "strtok", it would direct me to this link. >> >> >> > http://tw2.php.net/strtok >> >> >> > or >> >> >> > http://tw1.php.net/strtok >> >> >> > >> >> >> > Sincerely, Ray. >> >> >> > >> >> >> > >> >> >> > >> >> >> > 2013/12/4 Hannes Magnusson <[email protected]> >> >> >> >> >> >> >> >> I should have been more explicit, sorry. >> >> >> >> When I said "Chinese", I meant "Simplified Chinese" (zh-cn). >> >> >> >> >> >> >> >> If your browser sends ACCEPT_LANGUAGE language header with the >> >> >> >> value >> >> >> >> "zh", or "zh-cn" we will reply with Simplified Chinese. >> >> >> >> If you however send zh-anything-else then we reply with English. >> >> >> >> >> >> >> >> The only other way to automatically receive Simplified Chinese is >> >> >> >> like >> >> >> >> I previously explained. >> >> >> >> >> >> >> >> If you still maintain that this is a bug in our system, please >> >> >> >> send >> >> >> >> me >> >> >> >> your php.net cookies (if any), and your browsers request headers >> >> >> >> (especially the ACCEPT_LANGUAGE) header. >> >> >> >> If you can tell which mirror you are using (e.g. the full url of >> >> >> >> your >> >> >> >> request) that would be helpful. >> >> >> >> >> >> >> >> -Hannes >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Dec 3, 2013 at 6:16 PM, Ray Wang <[email protected]> >> >> >> >> wrote: >> >> >> >> > First of all, thanks for your reply. >> >> >> >> > >> >> >> >> > In Taiwan, we use Traditional Chinese(zh-tw) instead of >> >> >> >> > Simplified >> >> >> >> > Chinese(zh-cn). >> >> >> >> > These are very different. Also, It make me very uncomfortable >> >> >> >> > because >> >> >> >> > of >> >> >> >> > the >> >> >> >> > relation between China and Taiwan. >> >> >> >> > We are different country. Moreover, China always wants to >> >> >> >> > conquer >> >> >> >> > Taiwan. >> >> >> >> > >> >> >> >> > For example, if I set up a webside using Russian as default >> >> >> >> > language >> >> >> >> > for >> >> >> >> > American, it would also make >> >> >> >> > you angry? right? >> >> >> >> > >> >> >> >> > Therefore, can you change the default language to be English >> >> >> >> > instead >> >> >> >> > of >> >> >> >> > Simplified Chinese for Taiwanese? >> >> >> >> > Also, I would be very glad if there is something I can help. >> >> >> >> > >> >> >> >> > Sincerely, Ray. >> >> >> >> > >> >> >> >> > >> >> >> >> > 2013/12/4 Hannes Magnusson <[email protected]> >> >> >> >> >> >> >> >> >> >> On Mon, Dec 2, 2013 at 9:08 PM, Ray Wang <[email protected]> >> >> >> >> >> wrote: >> >> >> >> >> > Today, when I go in to php.net, I found that the language >> >> >> >> >> > is change to Simplified Chinese. >> >> >> >> >> > >> >> >> >> >> > BUT!! I am a Taiwanese. We DO NOT belong to China >> >> >> >> >> > and we DO NOT use Simplified Chinese. >> >> >> >> >> > >> >> >> >> >> > Please change the language to English automatically for >> >> >> >> >> > each Taiwanese. Thanks. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> There are 4 ways you can see Chinese version "automatically": >> >> >> >> >> - Your browser settings prioritize Chinese content over >> >> >> >> >> English >> >> >> >> >> - The mirror you used has Chinese configured as default >> >> >> >> >> language >> >> >> >> >> - The search results you "Googled" for where to the Chinese >> >> >> >> >> translation >> >> >> >> >> - Your last accessed manual page was a Chinese translation >> >> >> >> >> >> >> >> >> >> You can of course change the language on all the manual pages >> >> >> >> >> by >> >> >> >> >> selecting the appropriate language in the top-right language >> >> >> >> >> selection >> >> >> >> >> box. >> >> >> >> >> >> >> >> >> >> -Hannes >> >> >> >> > >> >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> > >> > > > -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
