grails - Fields internationalization -
i need make internationalized (english , arabic) application in grails, facing problems, instance got domain named students got below fields: view plaincopy clipboardprint?
note: text content in code blocks automatically word-wrapped
class students { string firstname string lastname } in views want above fields shown according language user selected in welcome page.
i made part of language selection, how part can achieved?
they several different ways handle internationalization.
for example creating sub class wrap fields:
class studentfields { string firstname string lastname } and add 2 references (one each locale):
class students { studentfields english studentfields arabic } then can access both languages using:
studentsinstance.english.firstname and
studentsinstance.arabic.firstname you can create custom tag handle logic (switching between english / arabic depending on current locale) gsp.
Comments
Post a Comment