Hi,
can someone post to me some peace of code, example, where to place files, resources in another language to internationalize swing menus?
Thanks.
Swing menu internationalization
-
- Posts: 45
- Joined: Thu Jun 26, 2014 8:24 am
- antibot: No, of course not.
- Location: Germany, Aachen
Re: Swing menu internationalization
Which IDE are you using?
Re: Swing menu internationalization
I am creating desktop application with Netbeans platforms framework so i am using Netbeans. I have Bundle.properties files for other text and other languages. But i cannot find any example how easy customize text from jfreechart components.
M.
M.
-
- Posts: 45
- Joined: Thu Jun 26, 2014 8:24 am
- antibot: No, of course not.
- Location: Germany, Aachen
Re: Swing menu internationalization
Mostly you use the bundles aswell. Which components do you want to internationalize ?
If you create your own component, you just use it like you always use it:
Do you mean this situation? Or do i misunderstand your problem?
If you create your own component, you just use it like you always use it:
Code: Select all
String international = Nbbundle.getMessage(<Yourclass>.class, "yourkey.title");
component.setXAxisName(international);
Re: Swing menu internationalization
For example i want to customize swing menu, when you right click on graph. There is menu with:
Properties
Copy
Save as...
Print
Zoom in
Zoom out
Auto range
and i want to replace these text with text from my Bundle file. I want internationalize these texts.
M.
Properties
Copy
Save as...
Zoom in
Zoom out
Auto range
and i want to replace these text with text from my Bundle file. I want internationalize these texts.
M.
-
- Posts: 45
- Joined: Thu Jun 26, 2014 8:24 am
- antibot: No, of course not.
- Location: Germany, Aachen
Re: Swing menu internationalization
Check under org.jfree.chart.LocalizationBundle.properties. You have different Locales there, maybe you have to add you country or just edit the ones which are there