Thank You very much for fast response...
Nevermind...
I have noticed that the *.properties files may produce an ExceptionInInitializerError on some machines... The reason is unknown for me but the point is when one uses strictly the class of the JfreeChart package everything is fine, but when one uses the jar file (JFreeChart or his own jar included the JFreeChart package) the exception is thrown away.
I have done some modification in the JFreeChart package...
I suggest to use the LocalizationBundle.class rather then LocalizationBundle.properties file. In that case (use localization bundle class) everything works fine and no exception is thrown. Modification of those locale is maybe more difficult but the app is more localization bundle problems indepedent.
What You can do is change the boundle.properties file to boundle.class:
Example:
The LocalizationBundle.properties
# org.jfree.chart.ChartPanel ResourceBundle properties file
#
# Changes (from 31-Aug-2003)
# --------------------------
# 31-Aug-2003 : Initial version (AL);
#
Auto_Range=Auto Range
All_Axes=Both Axes
Chart_Properties=Chart Properties
Copy=Copy
Horizontal_Axis=Horizontal Axis
PNG_Image_Files=PNG Image Files
Print...=Print...
Properties...=Properties...
Save_as...=Save as...
Vertical_Axis=Vertical Axis
Zoom_In=Zoom In
Zoom_Out=Zoom Out
The LocalizationBundle.class
- Code: Select all
package org.jfree.chart;
import java.util.*;
public class LocalizationBundle extends ListResourceBundle
{
public Object[][] getContents()
{
return contents;
}
static final Object[][] contents =
{
{"Auto_Range", "Auto Range"},
{"All_Axes", "Both Axes"},
{"Chart_Properties", "Chart Properties"},
{"Copy", "Copy"},
{"Horizontal_Axis", "Horizontal Axis"},
{"PNG_Image_Files", "PNG Image Files"},
{"Print...", "Print..."},
{"Properties...", "Properties..."},
{"Save_as...", "Save as..."},
{"Vertical_Axis", "Vertical Axis"},
{"Zoom_In", "Zoom In"},
{"Zoom_Out", "Zoom Out"},
};
}
Thats all folks!
Obviously You have to use right sufix.
Example:
For the Polish locale You have to add the _pl_PL sufix (LocalizationBundle_pl_pl).
The rest shouldn't modified...
Best regards.
Nemezis.
/*Ograniczony umysł wyżywa się w nieograniczonych ambicjach*/