BeeSoft®
Since 1992
 

Content

 Welcome
 Products
       Abeona
       Gaia
             News
             Documentation
                   Introduction
                   Swing support
                         Components
                         Building from XML
                               Step by step
                               XML elements
                               Data binding
                               Internationalization
                         Client / server
                   Server application
                   Validation
                   XML
                   Logging
                   Utilities
                   Launcher
             License
             Download
       Hephaistos
       JavaGantt
 Services
       Promote your software
 Contact Us
 Links
      
  GaiaI®
© 2012 BeeSoft ®
 

Internationalization

The internationalization in Gaia is supported in SwingBuilderFactory and in all SwingBuilder classes.

First you have to say to the SwingBuilderFactory where can it find ResourceBundle properties file to use:

	String messagesId = "mypackage.myform";
	factory.setResourceBundle (messagesId);

Each SwingBuilder overrides initId() method to trying initialize component from resource bundle. It takes given id, appends dot separator and name of the property and tries to load it from resource bundle. If found, invokes corresponding init...() method to initialize property.

So it is possible to write XML element:

	<label id="mylabel" />	
and to create properties in resource bundle:
	mylabel.text=This is my label
	mylabel.icon=/dir/my.jpg

and your text, icon, etc. is initialized from resource bundle. In the implementation is used class eu.beesoft.gaia.util.Language to get correct values from resource bundle.

Please note, to use this feature each (localized) element must have an id attribute.