diff options
Diffstat (limited to 'src/mgr/localemgr.cpp')
-rw-r--r-- | src/mgr/localemgr.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/mgr/localemgr.cpp b/src/mgr/localemgr.cpp index 628d271..90d4716 100644 --- a/src/mgr/localemgr.cpp +++ b/src/mgr/localemgr.cpp @@ -1,10 +1,11 @@ /****************************************************************************** - * localemgr.cpp - implementation of class LocaleMgr used to interact with - * registered locales for a sword installation * - * $Id: localemgr.cpp 2499 2010-01-02 04:51:05Z scribe $ + * localemgr.cpp - implementation of class LocaleMgr used to interact with + * registered locales for a SWORD installation * - * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * $Id: localemgr.cpp 3005 2014-01-09 04:06:11Z greg.hellings $ + * + * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society * P. O. Box 2528 * Tempe, AZ 85280-2528 @@ -39,8 +40,10 @@ SWORD_NAMESPACE_START + LocaleMgr *LocaleMgr::systemLocaleMgr = 0; + class __staticsystemLocaleMgr { public: __staticsystemLocaleMgr() { } @@ -261,12 +264,12 @@ void LocaleMgr::setDefaultLocaleName(const char *name) { stdstr(&defaultLocaleName, tmplang); // First check for what we ask for - if (!getLocale(tmplang)) { + if (locales->find(tmplang) == locales->end()) { // check for locale without country char *nocntry=0; stdstr(&nocntry, tmplang); strtok(nocntry, "_"); - if (getLocale(nocntry)) { + if (locales->find(nocntry) != locales->end()) { stdstr(&defaultLocaleName, nocntry); } delete [] nocntry; @@ -274,4 +277,6 @@ void LocaleMgr::setDefaultLocaleName(const char *name) { delete [] tmplang; } + SWORD_NAMESPACE_END + |