1. #31
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    Lausanne, Switzerland
    Posts
    196
    Vote Rating
    1
    mcbl can only hope to improve

      0  

    Default


    Oh yeah! We need i18n and l10n as quick as possible!

    // For newbies:
    var i18n = "internationalization",
    l10n = "localization";

  2. #32
    Sencha User
    Join Date
    Mar 2012
    Posts
    21
    Vote Rating
    3
    Svinja is on a distinguished road

      0  

    Default


    agree, we need this is as soon as possible, no rush though

  3. #33
    Sencha User
    Join Date
    Mar 2012
    Posts
    21
    Vote Rating
    3
    Svinja is on a distinguished road

      0  

    Default


    Quote Originally Posted by ssamayoa View Post
    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".
    Thx for the code, this works great,it can localize whole app by calling:
    Code:
    Localizer.localize(this.up('viewport'));
    Maybe it would be good idea to put this on git, in my opinion it is the best solution so far. I have found this also:
    https://github.com/mitchellsimoens/Ux.locale.Manager
    but i like Localizer better since it is simpler.

  4. #34
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,323
    Vote Rating
    197
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by Svinja View Post
    Thx for the code, this works great,it can localize whole app by calling:
    Localizer.localize(this.up('viewport'));
    Glad to heard that!

    Quote Originally Posted by Svinja View Post
    Maybe it would be good idea to put this on git
    I been very busy with another project lately.
    When I get some spare time I will do that.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  5. #35
    Ext JS Premium Member devtig's Avatar
    Join Date
    Jan 2010
    Location
    Rotterdam, The Netherlands
    Posts
    392
    Vote Rating
    13
    devtig will become famous soon enough

      0  

    Default


    I like Localizer better too, because the translation files are simpler compared to Ux.locale.Manager. I think translation files for Ux.locale.Manager are complicated beyond necessity.

    Yeah, I have already made some improvements to Localizer. For example translating multiple times and translating to a baseLocale which resets the translation by getting data from initialConfig. And some more minor fixes. But those changes I only made local...

    I would join the Localizer project on Github as a developer....

  6. #36
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,323
    Vote Rating
    197
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by devtig View Post
    I would join the Localizer project on Github as a developer....
    If you have enough time, please create the project and be the principal maintainer.

    Just keep in the js file a reference to me as original contributor.

    As soon as I can I will join the project.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  7. #37
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    Lausanne, Switzerland
    Posts
    196
    Vote Rating
    1
    mcbl can only hope to improve

      0  

    Default


    Please tell us here if you do so. Thanks!

  8. #38
    Ext JS Premium Member devtig's Avatar
    Join Date
    Jan 2010
    Location
    Rotterdam, The Netherlands
    Posts
    392
    Vote Rating
    13
    devtig will become famous soon enough

      1  

    Default


    I have started the GitHub project for Localizer: https://github.com/devotis/Ext.ux.Localizer

    It's contains now just a copy of what ssamayoa posted in this thread earlier (test1.zip). I have all my improvements integrated in a project. I need to isolate those improvements and also learn Git. I am used to working with Subversion. Give me some days and I hope to have my improvements on GitHub

    Everybody happy with the name Ext.ux.Localizer?

  9. #39
    Sencha User thesilentman's Avatar
    Join Date
    Apr 2007
    Location
    Athens, Greece
    Posts
    232
    Vote Rating
    2
    thesilentman is on a distinguished road

      0  

    Default


    Great! Thanks for your effort!! (@ssamayoa & @devtig)

  10. #40
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,323
    Vote Rating
    197
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by devtig View Post
    I have started the GitHub project for Localizer:
    Excellent!

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!