tel8618217223380 / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Localization problem in AnnotatedTimeLine #382

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: 1.1.0

Detailed description:
I load the Timeline package with some others like this:
    VisualizationUtils.loadVisualizationApi(onLoadCallback, 
AnnotatedTimeLine.PACKAGE, ColumnChart.PACKAGE, PieChart.PACKAGE);

I specifiy no locale, I have tried both with and without a GWT-property 
locale, it makes no difference. Either way on switching to the 1.1 version 
my ANnotatedTimeline loads exactly as before but decides to use spanish 
rather than english. I tried all the usual ways to set the locale, checked 
the browser, checked the computer, added a locale in the query startup 
string, localised the GWT app and specified a runtime "en" locale property.  
Nothing changed it. 

Workaround if you have one:
I experimented on the loading using :
AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setPackages(AnnotatedTimeLine.PACKAGE, ColumnChart.PACKAGE, 
PieChart.PACKAGE);
options.setLanguage("en"); //still loads spanish
AjaxLoader.loadApi("visualization", "1", onLoadCallback, options);

instead of the normal load through VisualizationUtils. Playing with this 
had some effect and by chance setting to "ko" - korean I presume - actually 
forces it to load in english. Even setting to "zz" failed - I think I got 
norweigen.

So my workaround to force an english locale version to load was : 
AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setPackages(AnnotatedTimeLine.PACKAGE, ColumnChart.PACKAGE, 
PieChart.PACKAGE);
options.setLanguage("ko");
AjaxLoader.loadApi("visualization", "1", onLoadCallback, options);

strange, but it does now show the dates in English again..

I am using GWT2.0, Chrome, Win XP 

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by goldsmit...@gmail.com on 7 Jun 2010 at 6:50

GoogleCodeExporter commented 9 years ago
See also issue 358

Original comment by zundel@google.com on 7 Jun 2010 at 6:54