• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to : Internationalization in Struts

 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to use/config Internationalization in Struts (I18N) ???
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one possibility is to use applicationresources. like this:
struts finds the client language from the request and calls the specific applicationresource file automatically.
suppose the name of your application resource file is
ApplicationResources.properties => this file is used for default language/English
now if oyu want to add support German language the create a new resource file with same name .. but add _de at the end like this:
ApplicationResources_de.properties => now when struts finds an german request then it will load the resources from ApplicationResources_de.properties file.

===========
using resources:
resources can be used by bean:message tag like :
<bean:message key="title.login"/>
entries in respectives files looks like =>
default:
title.login=New Admin console
_de:
title.login=Admin Konsole
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's work...

I'm use with thai and english language.


Thank you very much.
 
prabhat kumar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one possibility is to use applicationresources. like this:
struts finds the client language from the request and calls the specific applicationresource file automatically.
suppose the name of your application resource file is
ApplicationResources.properties => this file is used for default language/English
now if oyu want to add support German language the create a new resource file with same name .. but add _de at the end like this:
ApplicationResources_de.properties => now when struts finds an german request then it will load the resources from ApplicationResources_de.properties file.

===========
using resources:
resources can be used by bean:message tag like :
<bean:message key="title.login"/>
entries in respectives files looks like =>
default:
title.login=New Admin console
_de:
title.login=Admin Konsole
reply
    Bookmark Topic Watch Topic
  • New Topic