FXML Load Resource Bundle by DataFX

324 views
Skip to first unread message

Fernando Glizt

unread,
Jun 24, 2014, 2:27:27 PM6/24/14
to dataf...@googlegroups.com
I'm trying to implement internationalization, using strings of the properties file. Following the Oracle documentation for the Scene Builder and Internationalization (http://docs.oracle.com/javase/8/scene-builder-2/user-guide/i18n-support.htm # JSBRG152) in Scene Builder works normally however using DataFX not know how to load the Resource Bundle. 

Without using DataFX, I believe it could be done this way: 

FXMLLoader fxmlLoader = new FXMLLoader();
fxmlLoader.setResources(ResourceBundle.getBundle("bundles.MyBundle", locale));

Could someone help me make the Resource Bundle is loaded by the application, using DataFX? 

* sorry my bad english (by translator)

Hendrik Ebbers

unread,
Jul 10, 2014, 3:04:29 AM7/10/14
to dataf...@googlegroups.com
Hi,
take a look at the ViewConfiguration class (https://bitbucket.org/datafx/datafx/src/e208f84cd5f479f3e779376113ab4543ec71a7cf/datafx-core/src/main/java/org/datafx/controller/ViewConfiguration.java?at=default). You can use this class to define a resource bundle for one view or a flow. 
Until know I didn't create an example for this and it's not 100% testet. So if you have any issues please ask us :)
Reply all
Reply to author
Forward
0 new messages