1. #1
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Lightbulb Multilingual and JavaScript

    Multilingual and JavaScript


    Okay, more a JavaScript question but also good to know for ExtJs developers.

    What is the best way to make multilingual web applications with JavaScript? For example, I have an ExtJs form, how can I easliy change the labels to an other language? Do I need some kind of string array? Are there other ways?

    Thanks you!

  2. #2
    Ext User santosh.rajan's Avatar
    Join Date
    Sep 2007
    Location
    Kannur, Kerala, India
    Posts
    611
    Vote Rating
    0
    santosh.rajan is on a distinguished road

      0  

    Default


    Well here is a way you can do that. Lets assume you have a namespace called MyApp. And let us say you have an app with following labels, "Add", "Edit", "Delete" in your English language version. Create a file called MyApp_language_en.js and put the following code in that file.
    PHP Code:
    MyApp.lang = {
        
    add"Add",
        
    edit"Edit",
        
    delete"Delete"
    }; 
    In you code you can access these variables as
    PHP Code:
    ....
        
    labelMyApp.lang.add,
    ....
        
    labelMyApp.lang.edit,
    ....
        
    labelMyApp.lang.delete,
    .... 
    Now if you want a different language version of you application, lets say french, just copy MyApp_language_en.js to MyApp_language_fr.js and translate the values in quotes ie add, edit, delete to french. Your MyApp_language_fr.js will look like this.
    PHP Code:
    MyApp.lang = {
        
    add"Ajoutez",
        
    edit"Editez",
        
    delete"Suppression"
    }; 
    (My French is not very good this is babelfish translation for the words.)
    And just load MyApp.language_fr instead of MyApp_language_en for your french version of the application.

    I hope i this is the answer you were looking for.
    Make everything as simple as possible, but not simpler.
    - Albert Einstein

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    3
    Vote Rating
    2
    bguban is on a distinguished road

      0  

    Default


    How to create multilingual application in Sencha Architech 2? There I cannot put variable to field`s label config!!!

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    3
    Vote Rating
    2
    bguban is on a distinguished road

      1  

    Default


    Hi. I create some fix for creating multilingual applications in Sencha Architech 2. Here is a link http://www.sencha.com/forum/showthre...l=1#post844816

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi