Change tho local in WebViewer [message #210599] |
Thu, 11 January 2007 03:22 |
Eclipse User |
|
|
|
Originally posted by: alice.mange.gmail.com
Hi Communauty,
I use the following sample org.eclipse.birt.examples.rcpviewer that I
download from internet.
I have already doing a Report Project where I creat few project and where
I define a ressource file for the internationalization : *.properties.
I have two ressources files : ApplicationResources_en_US.properties et
ApplicationResources_fr_FR.properties. I define
ApplicationResources_en_US.properties for my report.
Now when I try to define french local for report I have this code :
WebViewer.display(reportName , WebViewer.HTML, true);
String locale = ViewerPlugin.getDefault().getPluginPreferences(
).getString( WebViewer.USER_LOCALE );
System.out.println("previous locale ="+locale+"-");
String sLocale = (String) WebViewer.LocaleTable.get("français (France)");
// -> sLocale = "fr_FR"
//String sLocale = (String) WebViewer.LocaleTable.get("anglais
(Etats-Unis)");
ViewerPlugin.getDefault( ).getPluginPreferences(
).setValue(WebViewer.USER_LOCALE, sLocale);
locale = ViewerPlugin.getDefault( ).getPluginPreferences( ).getString(
WebViewer.USER_LOCALE );
System.out.println("New locale ="+locale+"-"+", sLocale="+sLocale);
ViewerPlugin.getDefault( ).savePluginPreferences();
My problem it is when the Birt Report Viewer open My report, ths local
using is en_US (the local who is load on property ressource of my report)
So it is like my previous code haven't effect....
I can notice you that in my report project I done a reportory \properties
where all my properties file are save, I define this path in the eclipe's
preferences (Windows/Preferences.../Report Design/Resource).
Do you have any ideas about how I can change my local ?
|
|
|
Powered by
FUDForum. Page generated in 0.06136 seconds