Re: weekly news - auto detect language
| From: | Ondrej Jombik | Date: | Mon, 19 Aug 2002 21:39:24 +0000 |
| Subject: | Re: weekly news - auto detect language | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-8518@lists.php.net to get a copy of this message | ||
> what do u weekly-news-guys think about autodetecting the browser
> language to show the news in the language the browser
> you could do that using a pear package :-) I18N (no package available
> yet, but i am working on it)
> $neg = new I18N_Negotiator;
> $lang = $config->checkLanguage($neg->getLanguageMatch());
I was thinking also about the IP/hostname parsing to get country of
user using HTTP client. In our country there is for example a lot of english
instalation of GNU/Linux, because it is not fully translated yet. Passing
$lang optionally thought one more test could get more desirable behaviour.
=Nepto=
____________________________________________________________________________
Ondrej 'Nepto' Jombik, perl -le '$_=1;(1x$_)!~/^(11+)\1+$/&&print
while$_++'