var localization = {
   lang: "fr",
   _stringTable: {
"file.complete.result": "Les résultats resteront disponibles sur le serveur pendant {0} jours.","lng_he": "Hébreu","lng_en": "Anglais","lng_da": "Danois","lng_sq": "Albanais","lng_ar": "Arabe","lng_it": "Italien","lng_bg": "Bulgare","lng_sr": "Serbe","lng_zt": "Chinois","lng_af": "Afrikaans","lng_uk": "Ukrainien","lng_cs": "Tchèque","lng_ur": "Ourdou","lng_vi": "Vietnamien","lng_sk": "Slovaque","lng_tl": "Tagalog","lng_fi": "Finnois","lng_hr": "Croate","lng_fa": "Persan","lpprep": "vers","lng_zh": "Chinois","lng_no": "Norvégien","file.appro.complete": "Estimation du temps restant : 0 secondes.","lng_pt": "Portugais","lng_ru": "Russe","lng_hi": "Hindi","lng_sv": "Suédois","lng_nl": "Néerlandais","lng_tr": "Turc","lng_fr": "Français","lng_lv": "Letton","lng_sh": "Serbo-croate","lng_de": "Allemand","lookup.empty": "Merci d'entrer un mot pour la recherche dictionnaire.","lng_el": "Grec","lng_pl": "Polonais","file.complete.request": "Votre traduction est terminée.","lng_sl": "Slovène","lng_es": "Espagnol","lng_hu": "Hongrois","lng_ja": "Japonais","lng_ro": "Roumain","lng_id": "Indonésien","lng_ko": "Coréen"   },
    getString: function(id) {
        var str = localization._stringTable[id];
        if(str == null) {
            str = "[" + id + "]";
        }
        return str;
    },
    localizeHtml: function(html) {
        var matchIndex = 0;
        var endIndex;
        while((matchIndex = html.indexOf("@loca.", matchIndex)) > -1) {
            endIndex = html.indexOf("@", matchIndex + 1);
            if(matchIndex > -1) {
                html = html.substring(0, matchIndex) +
                       localization.getString(html.substring(matchIndex + 6, endIndex)) +
                       html.substr(endIndex + 1);
            }
        }
        return html;
    },
    localizeLp: function(lp) {
        var src = lp.substr(0,2);
        var tgt = lp.substr(3,2)
        return localization.getString('lng_' + src) + ' ' + localization.getString('lpprep') + ' ' + localization.getString('lng_' + tgt);
    }
}
