Neseek77 / gwt-google-apis

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

Enable setLanguage in VisualizationUtils#loadVisualizationApi #492

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: 1.1.2

Give a Detailed description of the problem.  If possible, please include
some code that reproduces the problem and a verbatim copy of any error
messages you can find.

Hi,
I want to specify language for my charts and I see in the wrapper code that 
it's possible but not implemented : 

class AjaxLoaderOptions :

public final native void setLanguage(String language) /*-{
      // TODO(zundel): try to incorporate w/ GWT locale?
      this.language = language;
}-*/;

Could you create a new loadVisualizationApi function with language parameter 
and include options.setLanguage below options.setPackages ?

Thanks,

Original issue reported on code.google.com by fabien.g...@rtone.fr on 24 Jan 2012 at 4:17

GoogleCodeExporter commented 9 years ago
For the time being, you can just call AjaxLoder directly.  The 
loadVisualizationApi() is just a convenience.

Original comment by zundel@google.com on 24 Jan 2012 at 4:32

GoogleCodeExporter commented 9 years ago
Indeed, I was trying that. Thanks for your reply

Original comment by fabien.g...@rtone.fr on 24 Jan 2012 at 4:40

GoogleCodeExporter commented 9 years ago
I tried my own load code but language option is not effective:

AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setPackages(packages);
options.setLanguage(language);
AjaxLoader.loadApi("visualization", version, onLoad, options);

I see in firebug that the request do not get the language parameter. Perhaps I 
miss understand something ?

Thanks,

Original comment by fabien.g...@rtone.fr on 24 Jan 2012 at 5:28

GoogleCodeExporter commented 9 years ago
BTW, it would be cool to have LocaleInfo.getCurrentLocale().getLocaleName() as 
a default language, rather than browser's one.

Original comment by alexis.h...@gmail.com on 2 Apr 2013 at 9:35