i18n in scene builder
963464Sep 20 2012 — edited Sep 21 2012I'm trying to internationalize a JavaFX 2.2 app.
When I set the resource file (.properties) in Scene Builder, I can see labels with text in selected language. But when I try to run it, this gives me the following error:
No resources specified.
file:/C:/Users/xxx/dist/I18n.jar!/org/osl/javafx/InterfaceScn.fxml:34
and line 34 in my fxml file is:
*<Label id="lineNumberValue" layoutX="343.0" layoutY="63.0" text="%lineNumber" />*
in .properties file lineNumber key is set and as I have already mentioned I can see in scene builder that it takes value from the .properties file.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If I remove this .properties resource from within scene builder and set "*-fx-font-family: "Raavi";*" in my stylesheet, it works fine but now I can't see the actual words but boxes in scene builder.
I mean now the app runs fine and I can read text of labels in that other language but its very difficult to design interface in scene builder.
Isn't there any way by which I can see values from .properties file while designing the interface and it also let the app to run.
I have tried putting localizing code in my main class by setting Locale and then using ResourceBundle to load my .properties resource by that didn't work either.
Thanks, for any suggestion or example code. Cheers.