【问题标题】:How to change TEXT of Done and Cancel button of select Field in sencha touch 2 framework如何在sencha touch 2框架中更改选择字段的完成和取消按钮的文本
【发布时间】:2014-01-30 19:03:36
【问题描述】:

我需要在我的应用程序中翻译所有 selectField 的按钮。我做了什么:

Ext.override(Ext.Picker, {
    doneButton: 'Terminer',
    cancelButton: 'Annuler'
});   

不工作。

还有……

{
   xtype: 'selectfield',
   name: 'default_language',
    options: [
        {text: 'English', value: 'en'},
        {text: 'Francais',  value: 'fr'}
    ],
    doneButton: {
        text: "Terminer"
    }
}

不工作...

还有其他想法吗? 谢谢。

【问题讨论】:

    标签: extjs sencha-touch-2 translation


    【解决方案1】:

    您可以为手机/平板电脑指定配置,瞧:http://docs.sencha.com/touch/2.0.2/#!/api/Ext.field.Select-cfg-defaultPhonePickerConfig

    {
            xtype : 'selectfield',
            label : 'My Label',
            defaultPhonePickerConfig : {
                doneButton : 'You Button Text!',
                cancelButton : 'You Button Text!'
            },
            options                  : [
                { text : 'First Option',  value : 'first'  },
                { text : 'Second Option', value : 'second' },
                { text : 'Third Option',  value : 'third'  }
            ]
        }
    

    【讨论】:

    • @VWGolf2 为我工作。赞成。如何转课?
    猜你喜欢
    • 2012-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-03
    相关资源
    最近更新 更多