On Wed, Jan 21, 2009 at 3:03 AM, David Cantrell <[email protected]> wrote: > Tatsuhiko Miyagawa wrote: > >> You can get the user's country ... from Accept-Language HTTP header > > No you can't. I prefer to use English (specifically en-gb) whether I'm in > the UK, Germany or Japan. Even if I were to move to Japan permanently, I'd > still prefer to use English, and so leave that header set to en-gb, but > would also like sites to know that I'm in the Asia/Tokyo timezone.
Don't cut-quote my original message. You can get the user's country using their preference, or from Accept-Language HTTP header or using IP-to-geo mapping. If Accept-Language header only contains the language not country (like en, instead of en_gb), or that doesn't match with the country you can guess from IP, you can dislpay both. I know I'm not suggesting the solution that works for 100% of situations, if the user wants to get the explicit list of all timezones, you could always display them all with the checkbox or something (like you can see on google calendar). > Or consider that French is used not just in mainland France, but also in St > Pierre (off the Canadian coast), a load of places in the Caribbean, and the > Indian and Pacific oceans. In an ideal world when a Canadian people uses French, the HTTP-Accept header value would be fr_ca, instead of just fr. But even if it's just 'fr', wr can go back to the previous paragraph. -- Tatsuhiko Miyagawa
