Hi,

On Fri, Jul 5, 2013 at 5:54 PM, Henk van Oers <[email protected]> wrote:

> On Fri, 5 Jul 2013, Pedro Melo wrote:
>
>  I'm being asked to write a webapp for a site that will have three
>> versions for, one for each language.
>>
>> The current idea is to use http://site.tld/en/, 
>> http://**site.tld/de/<http://site.tld/de/>and
>> http://site.tld/fr/.
>>
>> I'll need to think this over on how to do this with Dancer2, but I want
>> to reuse as much as possible of the routes between the three sites.
>>
>> Does anybody did this before and can share a strategy? My current best
>> solution for this would be to had a hook as soon as possible and remove the
>> first level path if it matches one of the languages we
>> support and set a var for it.
>>
>> Any other suggestions?
>>
>
> For static pages I use 
> http://site.tld/name/of/**document/<http://site.tld/name/of/document/>
> and than 'index' . $lang . 'html'
>
> For dynamic pages I use request->request_language()
>
> For loged-in users I use the language in there profile.
>
> There is no need for $lang in the route IMHO.
>

/LANG/ prefix should not be needed if you can trust language negotiation,
sure. But I'm tired of fighting proxys that cache pages ignoring those
headers to go this route.


How big will get ':lang' => sub { ... } be?


I don't understand this. I don't have a route like that.

Bye,
-- 
Pedro Melo
@pedromelo
http://www.simplicidade.org/
xmpp:[email protected]
mailto:[email protected]
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to