Moldarin
06-14-2006, 09:19 AM
Hi,
I am to build a multilingual Website using PHP 4 on an Apache server.
The Website will be available in English (en) and Norwegian bokmål (nb-NO).
I want to show the default page in english with a URL like this: http://domain.com/index.en and if the reader accept Norwegian (nb-NO OR just NO OR NB) they will be directed to http://domain.com/index.no. And then again http://domain.com/products.en and http://domain.com/produkter.no... And so on.
But I am unsure how to check if the user accept Norwegian (in their browsers header, right?) and if they do not; show them the English version.
Please provide code examples.:thumbsup:
I am to build a multilingual Website using PHP 4 on an Apache server.
The Website will be available in English (en) and Norwegian bokmål (nb-NO).
I want to show the default page in english with a URL like this: http://domain.com/index.en and if the reader accept Norwegian (nb-NO OR just NO OR NB) they will be directed to http://domain.com/index.no. And then again http://domain.com/products.en and http://domain.com/produkter.no... And so on.
But I am unsure how to check if the user accept Norwegian (in their browsers header, right?) and if they do not; show them the English version.
Please provide code examples.:thumbsup: