[imp] Language selection from browser setting

Jan Schneider jan@horde.org
Fri, 21 Dec 2001 13:42:49 +0100


Zitat von Antonio Dias <accdias@sst.com.br>:

> On Fri, 2001-12-21 at 09:27, Jan Schneider wrote:
> > I changed the _map() method to return the translated locale instead
> what 
> > the browser sent if it can't find a valid mapping, e.g. pt_BR instead
> of pt-
> > BR. Try if it works now.
> 
> Thanks. That fix the problem and now it is working like a charm. 
> 
> Another way to achieve the correct result (for pt-BR at least) is add
> an
> entry for pt-BR in the aliases lists in horde/conf/lang.php. I did 
> 
> 	$nls['aliases']['pt'] = 'pt_BR';
> 
> And _map() returned the correct value.

But this would give everyone who has Portugues as the prefered language 
selected in his browser the Brazilian Portugues translation. I know there 
are more Brazilian Portugues speakers than "European" Portugues but I 
assume that most of the people who select just 'pt' want to get pt_PT.

Jan.

::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::