1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    264
    Vote Rating
    0
    Stephan123 is on a distinguished road

      0  

    Default Translation fieldlabel

    Translation fieldlabel


    Hello !

    In the moment i look for an way to translate the fieldlabe's of a form.
    I have same languages a in the moment i know not how many.
    I will send an Ajax.request to the server. The Server became the language and the
    fieldlabel string. I became back the translated string.

    My form:

    Code:
    xtype: 'textfield',
                    fieldLabel: SprachUebermittlung('E-Mail Adresse'),
                    name: 'email',
                    id: 'email',
                    width: 200,
                    vtype: 'email',
                    allowBlank: false
                },{
                   xtype: 'textfield',
                    fieldLabel: 'Passwort',
                    name: 'passwort',
                    id: 'passwort',
                    inputType: 'password',
                    width: 200,
                    allowBlank: false
    The Ajax script:

    Code:
    // return "New Label";
    
    Ext.Ajax.request({
                method: 'post',
                url: 'kontroller.php',
                params: {
                    aktion: 'sprache',
                    modul: 'sprache',
                    sprache: language, // the aktuell language
                    inhalt: wert // the string to translate
                },
                success: function(response){
                    var rueck = Ext.util.JSON.decode(response.responseText);
                    
                    // console.dir(rueck);
                    
                    // return rueck.sprache;
                    
                    // console.warn('Sprachuebersetzung');
                    
                    return rueck.sprache;
                    
                }
            });
    I have tested 2 version.

    When i use the red version.
    No label is in the form.

    When i use the green version it works fine.

    Wy ??????????

    Your sincerly

    Stephan

  2. #2
    Sencha User realjax's Avatar
    Join Date
    Aug 2009
    Location
    Netherlands
    Posts
    412
    Vote Rating
    6
    realjax is on a distinguished road

      0  

    Default


    Little asynchronisity issue perhaps?

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    264
    Vote Rating
    0
    Stephan123 is on a distinguished road

      0  

    Default wrong way

    wrong way


    Hello !

    Thank for the info.
    I think the problem is the asynchron Ajax.
    On the client / browser the form is finishd and same time later
    the translation for the fieldlabel came back.

    In the moment i think about a other way.
    I will generate an application on the server.
    (With the correct translation).
    And in a second step i will send the application to the server.

    I have seen same interested projects on www.sourceforge.net

    Your sincerly

    Stephan

Thread Participants: 1

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