[Catalyst] Re: Language selection in URLs
Fayland Lam
fayland at gmail.com
Wed Nov 18 01:44:46 GMT 2009
why shouldn't you use domain as the part of the language? like
en.example.com, cn.example.com and something like that?
Thanks.
Octavian Râsnita wrote:
> From: "Bill Moseley" <moseley at hank.org>
>> What's your preferred approach to specifying a language tag in a URL? Is
>> there strong argument for one over the other?
>>
>> http://example.com/en_us/path/to/some/index.html # language prefix
>>
>> http://example.com/path/to/some/index.html?lang=en_us
>
> I prefer the former way because the URL looks nicer.
> (Not a very "strong" argument:)
>
>> Are pages in different languages different resources or different
>> versions
>> of the same resource?
>
> In most cases I think it is the same content with a different
> presentation style, language...
>
>> Obviously, the prefix is easier if you use relative URLs, but uri_for
>> makes
>> adding the query parameter easy. Although, probably could argue that the
>> prefix approach is more efficient than wrapping uri_for for every
>> generated
>> link.
>
> There is an example on the Catalyst wiki for overriding prepare_path()
> in order to use urls like /en/path/to/another/file.html without needing
> to change all controllers.
> Octavian
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
More information about the Catalyst
mailing list