1. #11
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    Just to answer my one question:
    You have to get the Navigation View, on that use
    Code:
     .getNavigationBar().titleComponent.getTitle() /setTitle('')
    I can now translate my whole application with one button press: buttons, lists, placeholders, ect.

  2. #12
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by hotdp View Post
    I can now translate my whole application with one button press: buttons, lists, placeholders, ect.
    Awesome!
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #13
    Sencha User
    Join Date
    Feb 2012
    Location
    Croatia
    Posts
    3
    Vote Rating
    0
    editor is on a distinguished road

      0  

    Default


    that's great, but can you provide maybe simple more detailed example (newbie level) for this all together ...

  4. #14
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Quote Originally Posted by hotdp View Post
    I can now translate my whole application with one button press: buttons, lists, placeholders, ect.
    Would you please elaborate a little bit?

    Where you put your localization code?

    At creation time?

    Before render?

    After render?

    At which level?

    Top views or each component is responsible of its own localization?

    I'm starting a new application and I want at least two languages support (english and spanish) so any help you can give me will be appreciated.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  5. #15
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    Quote Originally Posted by ssamayoa View Post
    Would you please elaborate a little bit?

    Where you put your localization code?

    At creation time?

    Before render?

    After render?

    At which level?

    Top views or each component is responsible of its own localization?

    I'm starting a new application and I want at least two languages support (english and spanish) so any help you can give me will be appreciated.

    Regards.
    Every component has a translation "key", typical the text. I will take this key look in my translation store (jsonp loaded at the start) if the store has the key I will replace the translation "key" with the value/text from the store for the given language code.
    If it is a dynamic translation I will look it op when I create the component etc. none loaded buttons or titles.
    getTranslation(key).
    So I will do this for every component in the application. Its fast and works perfectly.
    I hope this helps, let me know if I need to explain some things a little more.

  6. #16
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Quote Originally Posted by hotdp View Post
    getTranslation(key).
    I was thinking on traverse the config object or the dom looking for fieldLabel, column items and any localizable property and look for the localizable value in a (key, value) object and if found set the value.

    What I still dont know at which moment do this: beforeRender, afterRender, override initComponent, etc.

    In which event/method you do the localization?

    Thanks.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  7. #17
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Never mind.

    I been experimenting today and crafting a singleton class "Localizer" which receives an instantiated container (window for example) and looks for localizable properties on each children and if appropiate text found is replaced "a la gettext".

    What I still dont decided is the way I should get and store the translatation text and if I should design my application in english or spanish since english text are normally shorter than any other language.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  8. #18
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    I use "activate".
    But I could use another but I have to be sure that some of the components are rendered.

  9. #19
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      2  

    Default Localizer: work in progress

    Localizer: work in progress


    I'm attaching a project which is my current test bed for Localizer class.

    Is work in progress but I'm attaching so any interested can test it and make suggestions.

    The concept is simple: to localize a component you just call Localizer.localize(component, locale). The class looks for localized strings in "locales" property and if is not loaded tries to load it synchronously from ./app/locale/<code>.json. Then for each component in the container looks for localizable properties and for each one looks for the equivalent.

    I used gettext port for Delphi a few years ago so to easy the localization of messages inside code, Localizer class creates a global function called _().

    I start to figure out how to get localizable values from project's metadata files then generate a file or database table to be used for translation.

    Regards.



    PD: Tried to upload XDA file but allways loader says "invalid file".
    Attached Files
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  10. #20
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,733
    Vote Rating
    51
    Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough Phil.Strong is a jewel in the rough

      0  

    Default


    sorry we know for now you have to zip up xda files. Going to put in a request to get these on the white list.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar