pike.git / lib / modules / Calendar.pmod / Language.pmod

version» Context lines:

pike.git/lib/modules/Calendar.pmod/Language.pmod:1:   #pike __REAL_VERSION__    - import "."; -  +    static string flat(string s)   {    return replace(lower_case(s),    "àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'- "/1,    "aaaaaaeceeeeiiiidnoooooouuuuyty"/1+({""})*3);   }      static class _language_base   { -  inherit Rule.Language; +  inherit .Rule.Language;       static mapping events_translate=0;       string translate_event(string name)    {    if (events_translate) return events_translate[name]||name;    return name;    }   }   
pike.git/lib/modules/Calendar.pmod/Language.pmod:2157:       void create() { SETUPSTUFF; }   }      // ----------------------------------------------------------------      // find & compile language      static mapping _cache=([]);    - Rule.Language `[](string lang) + .Rule.Language `[](string lang)   {    lang=upper_case(lang); -  Rule.Language l=_cache[lang]; +  .Rule.Language l=_cache[lang];    if (l) return l;    program cl=::`[]("c"+lang);      // if unicode doesn't exist, try without    if (!cl && sscanf(lang,"%s_UNICODE",lang))    cl=::`[]("c"+lang);       if (!cl) { return UNDEFINED; }       l=_cache[lang]=cl();       return l;   }