British english on JavaFX controls
Michael Berry
mjrb5 at kent.ac.uk
Thu Oct 16 13:44:29 UTC 2014
Thanks for the suggested fix - unfortunately though that doesn't seem to
work. The following:
@Override
public void start(Stage primaryStage) throws Exception {
Locale.setDefault(new Locale("en", "UK"));
System.out.println(ResourceBundle.getBundle("com/sun/javafx/scene/control/skin/resources/controls").getString("ColorPicker.customColorLink"));
primaryStage.setScene(new Scene(new ColorPicker()));
primaryStage.show();
}
...prints out "Custom colour" (British spelling), but the control doesn't
pick this up.
Any idea if I could force a refresh on this somehow to get it to pick up
the british labels?
Thanks,
Michael
On 16 October 2014 13:37, Jim Clarke <jimclarke5 at me.com> wrote:
> Wouldn't you also have to fix the call to setLocale to "en_UK"?
>
> Sent from my iPhone
>
> > On Oct 16, 2014, at 8:34 AM, Tom Schindl <tom.schindl at bestsolution.at>
> wrote:
> >
> > Looking at the com/sun/javafx/scene/control/skin/resources/controls
> > package there's not extra properties file for en nor one for en_UK.
> >
> > Wild guess you can fix this is that you put such a properties file in
> > exactly this package of of your application and it will be picked up.
> >
> > Tom
> >
> >> On 16.10.14 14:06, Michael Berry wrote:
> >> Hello,
> >>
> >> I'm trying to get the JavaFX controls (specifically the ColorPicker) to
> >> display British English labels, that is "Colour" instead of "Color", but
> >> don't seem to be getting anywhere - do I need to do anything more than
> >> setting the default Locale?
> >>
> >> For instance:
> >>
> >> public void start(Stage primaryStage) {
> >> Locale.setDefault(Locale.UK);
> >> primaryStage.setScene(new Scene(new ColorPicker()));
> >> primaryStage.show();
> >> }
> >>
> >> ...gives me the ColorPicker with the US spelling of color. (Setting the
> >> locale to other languages seems to work fine.)
> >>
> >> Any ideas?
> >>
> >> Thanks,
> >>
> >> Michael
> >
>
More information about the openjfx-dev
mailing list