How can I url mapping the i18n lang?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I url mapping the i18n lang?

xunitc
Hello.

I use i18n for es, fr, jp.
I want use the url-mapping to show different language, maybe like:
//default English user:
"/book-show/$id"(controller: "book", action: "show")
"/board-show/$id"(controller: "book", action: "show")
//Japanese user:
"/jp/book-show/$id"(controller: "book", action: "show")
"/jp/board-show/$id"(controller: "book", action: "show")

How can I let the Japanese-browser auto add lang=jp to the url?
And I have lots of mappings, is there a global way to mapping all the mappings? the different is only the prefix(/jp, /es, /fr).
Xunitc
Reply | Threaded
Open this post in threaded view
|

Re: How can I url mapping the i18n lang?

Jos-4
On Sun, Jun 9, 2013 at 8:27 AM, xunitc <[hidden email]> wrote:

> Hello.
>
> I use i18n for es, fr, jp.
> I want use the url-mapping to show different language, maybe like:
> //default English user:
> "/book-show/$id"(controller: "book", action: "show")
> "/board-show/$id"(controller: "book", action: "show")
> //Japanese user:
> "/jp/book-show/$id"(controller: "book", action: "show")
> "/jp/board-show/$id"(controller: "book", action: "show")
>
> How can I let the Japanese-browser auto add lang=jp to the url?
> And I have lots of mappings, is there a global way to mapping all the
> mappings? the different is only the prefix(/jp, /es, /fr).
>

http://grails.1312388.n4.nabble.com/New-UrlMappings-in-Grails-1-0-3-td1351596.html

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: How can I url mapping the i18n lang?

xunitc
Hi.

Thanks for your link.
I see that, and try it. But my mappings is not the default, there are
lots of mappings by hand.
Like, some actions named show, and other actions named display, and
other.... There are 200+ mappings in the UrlMappings.groovy.


2013/6/10 Jos <[hidden email]>:

> On Sun, Jun 9, 2013 at 8:27 AM, xunitc <[hidden email]> wrote:
>> Hello.
>>
>> I use i18n for es, fr, jp.
>> I want use the url-mapping to show different language, maybe like:
>> //default English user:
>> "/book-show/$id"(controller: "book", action: "show")
>> "/board-show/$id"(controller: "book", action: "show")
>> //Japanese user:
>> "/jp/book-show/$id"(controller: "book", action: "show")
>> "/jp/board-show/$id"(controller: "book", action: "show")
>>
>> How can I let the Japanese-browser auto add lang=jp to the url?
>> And I have lots of mappings, is there a global way to mapping all the
>> mappings? the different is only the prefix(/jp, /es, /fr).
>>
>
> http://grails.1312388.n4.nabble.com/New-UrlMappings-in-Grails-1-0-3-td1351596.html
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>



--
Xunitc.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Xunitc