Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Localization?

  1. #11
    Sencha User
    Join Date
    Jun 2009
    Location
    Redwood City, CA
    Posts
    197

    Default

    Quote Originally Posted by endielo View Post
    When will the Ext Designer to support localization?
    It will take time, but it will. Can't be more specific than this, we have a lot on our plate that is equally important. One thing for sure though, updates will be coming a bit quicker than in the past, and the feature set will expand significantly (and keep growing after launch) compared to Designer 1.

  2. #12
    Sencha User
    Join Date
    Jun 2011
    Posts
    3

    Default

    Hi. I create some fix for this problem.

    I create a Controller Action in my Application. It query all components which contains text, title or fieldLabel config and it fires on beforerender event.
    Code:
    init: function() {
            this.control({
                "component[text],[title],[fieldLabel]": {
                    beforerender: this.onComponentBeforeRender
                }
            });
        }
    Then in onComponentBeforeRender function I invoke setText, setTitle or setFieldLabel for each selected component and put there translated value from global lang object.

    Code:
    onComponentBeforeRender: function(abstractcomponent, options) {
            //console.log(abstractcomponent);
    
    
            var accessors = {
                title: 'setTitle',
                text : 'setText',
                fieldLabel : 'setFieldLabel'
            };
    
    
            for (var key in accessors){
                if (typeof(abstractcomponent[key]) != "undefined"){
                    if(typeof(lang[abstractcomponent[key]])=="undefined"){
                        //console.log(abstractcomponent[key]);
                        unknownWords.push(abstractcomponent[key]); //DEBUG
                    }
                    abstractcomponent[accessors[key]](lang[abstractcomponent[key]] || abstractcomponent[key]);
                }
            }
    
    
        }
    It`s not good, but it`s working

    PS
    Sorry for my english

Page 2 of 2 FirstFirst 12

Posting Permissions

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