Murugesh
Murugesh

Reputation: 1001

i18n Support in ExtJS

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?

Upvotes: 0

Views: 857

Answers (1)

Christiaan Westerbeek
Christiaan Westerbeek

Reputation: 11157

There's a extension for this called Ext.ux.Localizer

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

With this component you can translate more than just labels through 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"]
}

You can even translate the data in some columns through localizableColumns:

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

It does not translate the values of fields in forms.

Upvotes: 1

Related Questions