Re: Symbolic Folders and Content Translation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 28, 2005 at 09:43:19PM -0600, Dan Jallits wrote:
> I want to be able to determine the browser language and
> redirect to the correct web folder. However, I want this folder to be
> symbolic, since I do not want multiple copies of the same information.
> Then the next step would be to pass the browser language to a service
> like Google Translate!

The first thing to look at is the var:

  $_SERVER['HTTP_ACCEPT_LANGUAGE']
 
HTTP_ACCEPT_CHARSET, might come in handy as well pending the
lanuage.

I would read the specs on how these vars should be used.

Second, i would take a look at the gettext extension in php

  http://php.net/gettext

This allows you to build a language dictionary for what ever
language you want to support. and you have one code base that just
looks like:


setlocale(LC_ALL', 'de_DE');
bindtext('myappname', '/path/to/dictionary');
textdomain('myappname');

echo _('This string will get translated if there is a german
dictionary of this string');


Curt.
-- 
cat .signature: No such file or directory

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux