0

I'm looking for the support of i18n in the ExtJS,and have seen in the net about reading the resource bundles and replacing the component's labels depends upon the locale. Though I've some doubts

  1. How about the data which got stored in the DB as unicode and I want populate those into ExtJs's component's

  2. Is rendering the labels of the Extjs components into different languages only possible?

4

1 回答 1

1

有一个名为 Ext.ux.Localizer 的扩展

https://github.com/devotis/Ext.ux.Localizer

使用这个组件,您不仅可以通过 localizableProps 翻译标签:

localizableProps : {
    // Ext.button
    button : ["text", "tooltip"],
    // Ext.form.field
    checkboxfield : ["fieldLabel", "boxLabel"],
    field : ["fieldLabel"],
    filefield : ["fieldLabel", "buttonText"],
    radiofield : ["fieldLabel", "boxLabel"],
    // Ext.form
    checkboxgroup : ["fieldLabel"],
    fieldcontainer : ["fieldLabel"],
    fieldset : ["title"],
    label : ["text"],
    // Ext.grid
    gridcolumn : ["text"],
    panel : ["title"],
    tooltip: ["html"],
    image: ["src"]
}

您甚至可以通过 localizableColumns 翻译某些列中的数据:

localizableColumns: [ //add grid column renderers 
    "status_description", "bounced"
]

它不翻译表单中字段的值。

于 2012-11-29T07:14:15.200 回答