On Mar 29, 2011, at 17:52, Carlos Eduardo Sotelo Pinto wrote:

> I has a cms that support differents languages, the question is how to use 
> this languages on a subdomain like
> 
> eng.mysite.com
> esp.mysite.com
> 
> or a directory
> 
> mysite.com/eng
> mysite.com/esp
> 
> i have read some articles like the make a language switch that use the url 
> helper for make a link on this way
> 
> mysite.com/eng/node/slug
> 
> and stores the language on session variable, but what about usinga prm 
> directory as a language or a domain.
> 
> I hope some have do this kind of app or an article

I don't know what a "prm directory" is. But I recommend placing the language 
code as the first thing in the path of the URL. (e.g. www.example.com/eng/...) 
This is what some large companies like Apple have already decided to do, and I 
assume they know what they're doing. I don't recommend using language 
subdomains for several reasons. Each resource on your site should be available 
from a single canonical URL. But if you serve images, css or other static 
resources from those domains, then they are available from multiple URLs. You 
could (and perhaps should) serve static resources from a separate hostname (or 
hostnames) used only for static resources. You also complicate issues if you 
ever want to use SSL -- normal SSL certificates are for a single hostname only. 
You can get a wildcard SSL certificate, but there might be older browsers that 
don't support it, and they're more expensive. You also have the cookie issue. 
If you want to bounce between language domains and preserve cookies (i.e. 
preserve the session), you have to set them on the root of the domain, which 
has performance implications for your static requests. You could purchase a 
second domain name for static requests, but that's also an added expense.



-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to