international php application and URL

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

 



Hi,

i'm thinking to make a multi languages application using PHP.

basically people should go to indx.php and can select 1 of the 4 languages available.
once chosen, application redirect to:
- www.myapp.com/en for english
- www.myapp.com/fr for french
- www.myapp.com/es for spanish
- www.myapp.com/de for german

i know that there are several way how to do it, but i also want to make it easy for SEO. 1. basically the first thought would be to create folders /en, /fr, /es, /de for each language but it would force me to have 4 times the same code and from maintenance point of view that's not good. 2. another approach would be to have a variable $lang in a session and to add it to each URL. However how to retrieve it easily when user will be on page www.myapp.com/fr/controlpanel/profile.php for example ? 3. we could also use the .htaccess file and rewrite URL, but how to retrieve the language parameter from URL ? or should it be in session variable ?

i don't know what is the best way and especially the more secured.
I would appreciate any feedback.

thx

--

Best Regards

Alain R.

The information contained in this e-mail message is privileged and confidential and is for the exclusive use of the addressee. The person who receives this message and who is not the addressee, one of his employees or an agent entitled to hand it over to the addressee, is informed that he may not use, disclose or reproduce the contents thereof. Please do not disclose the contents to anyone, but notify the sender by return email and delete this email (and any attachments) from your system. Thank you.

[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