Re: [PHP] localization folder for web site
On 14 Sep 2008, at 17:47, Alain R. wrote: Jochem Maas wrote: Alain R. schreef: Hi, mostly (90%) websites are designed to include localization (made in php) folder like following: www.mywebsite.com/en/ www.mywebsite.com/de/ www.mywebsite.com/fr/ why do they not use only 1 folder and use dynamically PHP to change localization of website ? who says the 'folders' (directories) en, de, fr et al actually exist? has this something to do with search engine rating ? amongst other things, it's also a way of passing along the requested translation with requiring cookies thanks a lot, Al. sorry but i miss the point here... if we have http://ww.mywebsite.com/en/index.php, you mean that in fact it can be http://ww.mywebsite.com/index.php?lang=en. but in this case why and how is it possible to see http://ww.mywebsite.com/en/index.php in the adress bar of my browser ? i mean if i do not have access to apache :-) You need to find out if your host has mod_rewrite installed and allows it to be overridden in .htaccess. If it can then that's how you can do it. If not then I suggest you find another host because the one you're with clearly doesn't match your requirements. Bottom line is that this really isn't hard. Please Google mod_rewrite to understand what it does and how it works. There is no browser involvement whatsoever. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
Jochem Maas wrote: Alain R. schreef: Hi, mostly (90%) websites are designed to include localization (made in php) folder like following: www.mywebsite.com/en/ www.mywebsite.com/de/ www.mywebsite.com/fr/ why do they not use only 1 folder and use dynamically PHP to change localization of website ? who says the 'folders' (directories) en, de, fr et al actually exist? has this something to do with search engine rating ? amongst other things, it's also a way of passing along the requested translation with requiring cookies thanks a lot, Al. sorry but i miss the point here... if we have http://ww.mywebsite.com/en/index.php, you mean that in fact it can be http://ww.mywebsite.com/index.php?lang=en. but in this case why and how is it possible to see http://ww.mywebsite.com/en/index.php in the adress bar of my browser ? i mean if i do not have access to apache :-) thx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
Alain R. wrote: Maciek Sokolewicz wrote: 2. google "apache mod_rewrite", that way you can rewrite urls of the form www.example.org/de/whatever to www.example.org/whatever?lang=de or even stick the de part into an environment variable $_ENV['lang'] = 'de' - Tul the mod_rewrite is possible only if i own/manage the apache server but i my case, i have a provider for that so it is not possible. can you explain a little bit more the $_ENV purpose ? because for me it's like a simple session variable nothing more. how do you use it ? i mean the concept... the concept is that you use mod_rewrite for apache (also works in litespeed httpd btw). using mod_rewrite you rewrite the request from www.example.com/fr/index.php to www.example.com/index.php and part of that is that it also sets the environment variable _ENV[lang] to 'fr' for example. Please look up the documentation for mod_rewrite if you want more info. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
Maciek Sokolewicz wrote: 2. google "apache mod_rewrite", that way you can rewrite urls of the form www.example.org/de/whatever to www.example.org/whatever?lang=de or even stick the de part into an environment variable $_ENV['lang'] = 'de' - Tul the mod_rewrite is possible only if i own/manage the apache server but i my case, i have a provider for that so it is not possible. can you explain a little bit more the $_ENV purpose ? because for me it's like a simple session variable nothing more. how do you use it ? i mean the concept... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
Alain R. wrote: so how can i do the same ? i mean to have 1 single PHP page and to localize, but to have the URI with /en, or /fr or /de ? i know how to localize the complete website i already done it, but what you told ? > One would hope that unless it's a pretty small static site those "folders" actually map to the same place and generate pages in the required language. The reason it's in the URI and not URI agnostic is indeed so that search engines can index multiple languages if they want to. -Stut 1. don't top-post please 2. google "apache mod_rewrite", that way you can rewrite urls of the form www.example.org/de/whatever to www.example.org/whatever?lang=de or even stick the de part into an environment variable $_ENV['lang'] = 'de' - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
how can i do the same ? Jochem Maas wrote: Alain R. schreef: Hi, mostly (90%) websites are designed to include localization (made in php) folder like following: www.mywebsite.com/en/ www.mywebsite.com/de/ www.mywebsite.com/fr/ why do they not use only 1 folder and use dynamically PHP to change localization of website ? who says the 'folders' (directories) en, de, fr et al actually exist? has this something to do with search engine rating ? amongst other things, it's also a way of passing along the requested translation with requiring cookies thanks a lot, Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
so how can i do the same ? i mean to have 1 single PHP page and to localize, but to have the URI with /en, or /fr or /de ? i know how to localize the complete website i already done it, but what you told ? > One would hope that unless it's a pretty small static site those "folders" actually map to the same place and generate pages in the required language. The reason it's in the URI and not URI agnostic is indeed so that search engines can index multiple languages if they want to. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] localization folder for web site
Alain R. schreef: Hi, mostly (90%) websites are designed to include localization (made in php) folder like following: www.mywebsite.com/en/ www.mywebsite.com/de/ www.mywebsite.com/fr/ why do they not use only 1 folder and use dynamically PHP to change localization of website ? who says the 'folders' (directories) en, de, fr et al actually exist? has this something to do with search engine rating ? amongst other things, it's also a way of passing along the requested translation with requiring cookies thanks a lot, Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] localization folder for web site
Hi, mostly (90%) websites are designed to include localization (made in php) folder like following: www.mywebsite.com/en/ www.mywebsite.com/de/ www.mywebsite.com/fr/ why do they not use only 1 folder and use dynamically PHP to change localization of website ? has this something to do with search engine rating ? thanks a lot, Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php