如何设置谷歌图表API语言环境 [英] How to set google chart API locale

查看:67
本文介绍了如何设置谷歌图表API语言环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将谷歌图表API的语言设置为一个值。
它目前使用浏览器访问页面的语言。
如何将其设置为我的应用程序的语言?

://developers.google.com/chart/interactive/docs/library_loading_enhancements#loadwithlocale>使用特定区域设置加载图表。



默认情况下,Google Chart图书馆会加载浏览器指定的区域设置。您可以通过在加载参数中显式指定区域设置来覆盖此默认设置。 pre> google.load('visualization','1',{'packages':['corechart'],'language':'ja'});


I want to set the language of the google chart API to a value. It currently uses the language of the browser visiting the page. How do I set it to the language of my application?

解决方案

See Google docs Loading Charts using a specific locale.

By default, the Google Chart libraries are loaded with the locale specified by the browser. You can override this default by explicitly specifying a locale in the loading parameters.

For example:

google.load('visualization', '1', {'packages':['corechart'], 'language': 'ja'});

这篇关于如何设置谷歌图表API语言环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆