• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Swing internationalization NetBeans

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,


I'm about to change language in Swing application developed in NetBeans.
Have followed tutorials and there are now 2 bundles: Bundle.properties and Bundle_es_ES filled with message key, value pairs.
In design mode i'm able to change in Inspector the Design Local property and reached the Bundle_es_ES, but in run-time i haven't found the way?

How to change language via combo-box in run-time?


Regards

 
Imre Tokai
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've done some improvement, need to:
Locale.setDefault(new Locale("en","US"))
and to load the resource bundle in the code again (with appropriate path), and to set the text on all elements on GUI;

Now, this work in NetBeans developer mode, but when i export Clean & Build the project to get .jar file, paths to Bundles are not recognized?
Strange that default language is loaded properly?

How to set paths to Bundles properly in NetBeans for exporting to external SWING .jar?


Regards
 
It's just a flesh wound! Or a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic