[Logo] Mentawai Recipes
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
How to use internationalization in DisplayTags  XML
Forum Index » Community Recipes
Author Message
rodrigo.avila



Joined: 24/01/2008 05:07:19
Messages: 30
Location: Brochier, RS | http://osm.org/go/M5t3EG8U
Offline

If you don't have any i18n file, follow this link:
http://www.mentaframework.org/i18n.jsp

if you want create your own DisplayTags, follow this link:
http://recipes.mentaframework.org/posts/list/34.page

To use internationalization in DisplayTags, do the following:

1) Create your taglib. For example:



2) Flaunt your taglib where are the i18n files. To do that, use



inside your getStringToPrint() method. After that, use



to get the internationalized text.

The first string is the path to your master file, from the application root. loc is the user localeé o locale do usuário, available automagically inside the class.

See the code:



Master file:

/i18n/master_pt_BR.i18n


/i18n/master_en_US.i18n

Rodrigo de Avila
http://www.avila.net.br
[WWW] [MSN]
 
Forum Index » Community Recipes
Go to:   
Powered by JForum 2.1.8 © JForum Team