Roxen.git / server / base_server / language.pike

version» Context lines:

Roxen.git/server/base_server/language.pike:1:   // Roxen Locale Support   // Copyright © 1996 - 2009, Roxen IS. - // $Id: language.pike,v 1.44 2009/05/07 14:15:52 mast Exp $ + // $Id$      #pragma strict_types      #include <roxen.h>   #define PROJECT "languages"      string default_locale;   //! Contains the default locale for the entire roxen server.      string default_page_locale;
Roxen.git/server/base_server/language.pike:86:      void set_default_locale(string def_loc)   {    def_loc = lower_case(def_loc);       string tmp;    if(def_loc != "standard") {    // Default locale from Globals    tmp = def_loc;    } -  else if ((tmp = [string] (getenv("LC_MESSAGES") || getenv("LANG")))) { +  else if ((tmp = [string] (getenv("LC_ALL") || +  getenv("LC_MESSAGES") || +  getenv("LANG")))) {    // Try default locale from environment    sscanf(tmp, "%s_%*s", tmp); //Handle e.g. en_US    }       default_locale=verify_locale(tmp);       if(!default_locale) {    // Failed to set locale, fallback to English    default_locale = "eng";    }