Results 1 to 6 of 6

Thread: How to reset 'Yes' to '??' for Ext.Msg.confirm

  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    5
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: How to reset 'Yes' to '??' for Ext.Msg.confirm

    How to reset the button text from 'Yes' to '??' for Ext.Msg.confirm? I did Ext.window.MessageBox.buttonText.yes = '??', it can't work.

    Another issue: I want to change the button text 'Update' to a Chinese character for Ext.grid.plugin.RowEditing, how i can do it?

    Any help is appricated!

  2. I found this code in one of the locale files. May be this can be helpful for you:
    Code:
    if(Ext.MessageBox){
            Ext.MessageBox.buttonText = {
                ok     : "OK",
                cancel : "Abbrechen",
                yes    : "Ja",
                no     : "Nein"
            };
            
            // As of 4.0.4, setting the buttonText above does not take effect properly. This should be removable in 4.1.0
            // (see issue EXTJSIV-3909)
            Ext.MessageBox.msgButtons['ok'].text = Ext.MessageBox.buttonText.ok;
            Ext.MessageBox.msgButtons['cancel'].text = Ext.MessageBox.buttonText.cancel;
            Ext.MessageBox.msgButtons['yes'].text = Ext.MessageBox.buttonText.yes;
            Ext.MessageBox.msgButtons['no'].text = Ext.MessageBox.buttonText.no;
        }

  3. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,100
    Answers
    113
    Vote Rating
    100
      0  

    Default

    For row editing plugin, you can use:

    Code:
    Ext.grid.RowEditor.prototype.saveBtnText = "What you want here";

  4. #3
    Sencha User
    Join Date
    Apr 2010
    Posts
    5
    Answers
    1
    Vote Rating
    0
      0  

    Default

    Farish, thank you! It works.

    For the reset the button text from 'Yes' to '??' for Ext.Msg.confirm, anyone any thoughts? Thanks ahead!

  5. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,100
    Answers
    113
    Vote Rating
    100
      0  

    Default

    I found this code in one of the locale files. May be this can be helpful for you:
    Code:
    if(Ext.MessageBox){
            Ext.MessageBox.buttonText = {
                ok     : "OK",
                cancel : "Abbrechen",
                yes    : "Ja",
                no     : "Nein"
            };
            
            // As of 4.0.4, setting the buttonText above does not take effect properly. This should be removable in 4.1.0
            // (see issue EXTJSIV-3909)
            Ext.MessageBox.msgButtons['ok'].text = Ext.MessageBox.buttonText.ok;
            Ext.MessageBox.msgButtons['cancel'].text = Ext.MessageBox.buttonText.cancel;
            Ext.MessageBox.msgButtons['yes'].text = Ext.MessageBox.buttonText.yes;
            Ext.MessageBox.msgButtons['no'].text = Ext.MessageBox.buttonText.no;
        }

  6. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    77
    Vote Rating
    2
      0  

    Default

    Have you import "ext-lang-zh_CN.js"?

  7. #6
    Ext JS Premium Member JTM's Avatar
    Join Date
    Mar 2007
    Location
    Plymouth, MI
    Posts
    50
    Vote Rating
    0
      0  

    Default Resolved?

    Was this issue resolved for other locales? Although the release notes for 4.0.7 proclaim this to be fixed, that does not seem to be the case for me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •