model view controller - Select language in grails -


i want create link allows me choose language, either spanish or english.

 <g: link controller = "$ {params.controller}" action = "$ {params.action}" params = "$ {params + [lang: 'en']}"> inglés </ g: link>  <g: link controller = "$ {params.controller}" action = "$ {params.action}" params = "$ {params + [lang: 'en']}"> spanish </ g: link> 

with code select language if change view reselect default language, not language choose.

how fix that?

you can store lang parameter in session , update params.lang in filters, way can set language preference of user whole session.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -