• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

GUI internationalization on the fly ?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I was evaluating the internationalization features in NB. It works a bit like resource files that are linked fix into the jar file.
For this approach is there are way to change language during runtime ?
or better..
is there a small framework to read the text (labels,..) from an outside source (DB,XML file,.) ? That also makes easier for 3rd parties to translate the GUI without touching code. Of course can implement by myself, but why reinvent again ?
Thanks
Sven
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know you can't change the language at runtine in NB. I think you even have to recompile.

The "pure-Java" way is to use the ResourceBundle classes with property files. (See i18n which means internationalization in google).

Regards,
Manuel
 
Sven Hefner
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you create multiple resource files for the various language you want to use, you can change the language during start with VM parameter "-Dcountry - Dlanguage". think it also reads the equivalent settings from the OS.
but you need to compile it into one file.
cheers
 
Marshal
Posts: 65102
247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, "Sven H"
Please check your private messages about an important administrative matter.
[ May 22, 2008: Message edited by: Campbell Ritchie ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!