This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GUI internationalization on the fly ?  RSS feed

 
Sven Hefner
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
 
Manuel Kampert
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
 
Campbell Ritchie
Marshal
Posts: 55751
163
  • 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!