Re: [Templates] Getting the language of the browser
[prev]
[thread]
[next]
[Date index for 2004/12/26]
Oh, but I don't want to force the users only to use a certain prefered
language.
I want to present the pages in the following languages in order:
1. the language that was chosen by the user in that session (using a link on
the page)
2. the language chosen by the user in a previous visit and was saved in a
database for registered users, or in a cookie for non registered users
3. If it is the first visit of this user, or he didn't choose before any
prefered language manually, use the prefered languages of his browser in
order of their importance.
4. If the browser doesn't present any prefered language, show the page in my
native language (because I know that most of the visitors will be from my
country), and I also know that most of them usually don't set a prefered
language in the browser.
5. If my site won't offer a translation for any of the languages prefered by
the browser, I think that it may be a visitor from another country, so I
will show the site in English.
So I will force a certain fixed language only in the last 2 cases.
In the third case I will offer the browser's prefered language, but most
important, I will always let the visitor to choose another language
manually.
I don't know if there could be other posibilities...
Teddy
----- Original Message -----
From: "David Hodgkinson" <daveh@xxxxxxxxxx.xxx>
To: "Octavian Rasnita" <orasnita@xxx.xx>
Cc: <templates@xxxxxxxxxxxxxxxx.xxx>
Sent: Sunday, December 26, 2004 6:17 PM
Subject: Re: [Templates] Getting the language of the browser
On 26 Dec 2004, at 16:14, Octavian Rasnita wrote:
> Well, I think that if a user set his browser to prefer a certain
> language,
> he prefers to view the web pages in that specific language and not
> other.
> If he wouldn't want that, he wouldn't set the browser that way and let
> it
> with no prefered language at all as the browser usually is by default.
http://www.w3.org/International/questions/qa-accept-lang-locales
--
Dave Hodgkinson
CTO, Rockit Factory Ltd.
http://www.rockitfactory.com/
Web sites for rock bands
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates