Closed benRenard closed 5 months ago
In BaRatinAGE, the language is set at startup and cannot be changed on-the-fly; hence, the limitation mentioned in the quote doesn't apply in our case.
I tried the following in the src/Utils/config.java
file (after loading the language from options/lang.txt
)and it actually changed the right click context menu language in jfreechart:
Locale l = new Locale(this.language);
Locale.setDefault(l);
However, the language code might need to be modified for some of the languages. For example, the actual code for Japanese is ja
, not jp
... (I hard coded the language code to test the context menu shown in the screenshot above).
This is fixed in BaRatinAGE v3 since the default JFreeChart context menu was removed to the profite of a custom menu which is now correclty translated.
Last time I checked (years ago!), this was not possible: "At the moment, the localisation files are loaded statically according to the default locale. There's no option to configure on-the-fly the locale/language for a given chart or chart-panel. It would be a nice feature to have."