1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    121
    Vote Rating
    0
    Stargazers is on a distinguished road

      0  

    Default Translate buttons "Yes", "No" and "Cancel"

    Translate buttons "Yes", "No" and "Cancel"


    Can I somehow translate buttons Yes, No and Cancel values to other language? I mean, without changing directly from Ext source?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,987
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Have a look at one of the language files under /locale.

    Code:
    if(Ext.MessageBox){
       Ext.MessageBox.buttonText = {
          ok     : "OK",
          cancel : "Abbrechen",
          yes    : "Ja",
          no     : "Nein"
       };
    }
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    121
    Vote Rating
    0
    Stargazers is on a distinguished road

      0  

    Default


    Well, should that read that file depending what is my server LANG-variable?

    I mean, when I type on Linux terminal "echo $LANG" I get message that I am using "en_US.UTF-8". So, if I create a file by copying to that name (ext-lang-en_US.js) under source/locale, should it work then?

    I can't make it work. Is there any other possible way? I mean, it would be nice if I can just give as a parameters to MessageBox my language setttings without external file, because if it depends on locale, it won't help me in this case (because same server -> many users -> should use difrerent localization settings).

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,987
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You need to include the js files yourself.

    For example if you're writing software for german users, you include ext-all, then ext-lang-de.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No, you simply include the locale script for the language you want after ext-all.js.

    (or you could dynamically load a locale script depending on the preferred browser language)

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,987
    Vote Rating
    649
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #7
    Ext User
    Join Date
    Jun 2008
    Posts
    121
    Vote Rating
    0
    Stargazers is on a distinguished road

      0  

    Default


    Thank you! Now it works!

Thread Participants: 2