【发布时间】:2013-03-19 20:44:08
【问题描述】:
我有一个 Highcharts 图表,里面有文字。如何根据所选语言更改此文本?这是我的代码:
var chart;
chart = new Highcharts.Chart({
(...)
subtitle: {
text: document.ontouchstart === undefined ?
'Click and drag in the plot area to zoom in' :
'Drag your finger over the plot to zoom in'
}
(...)
我的 en.yml 文件看起来像:
en:
actions:
zoom: "Click and drag in the plot area to zoom in"
我试过了
t("actions.zoom")
和
<% t "actions.zoom" %>
但他们不在 Ajax 内部工作。我应该怎么做 ?
【问题讨论】:
标签: ajax ruby-on-rails-3 internationalization highcharts