-1

In Grails views, I need to change the language for labels, buttons, etc., depending on the language that the user picked. How can that be achieved?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
SShehab
  • 1,039
  • 3
  • 17
  • 31

1 Answers1

1

i found a soultion to my problem .

A great thing of the scaffolding is that internationalizing the elements on the screen is a breeze! Default translations for Home and Create have already been provided for a dozen or so languages in the i18n folder. The name of the entity itself (“Product”) and its properties can be defined by following a convention: [entity name].label and [entity name].[property name].label – see your Grails installation /src/grails/templates/scaffolding folder.

Take a look at how we would translate a few things into Dutch, by adding a few keys to messages_nl.properties:

product.label=Product
product.name.label=Naam
product.status.label=Status

here is the link (http://tedvinke.wordpress.com/2012/08/22/grails-scaffolding-enums-and-i18n/)

SShehab
  • 1,039
  • 3
  • 17
  • 31