[sword-svn] r1757 - trunk/src/mgr

dglassey at crosswire.org dglassey at crosswire.org
Mon Mar 28 13:05:51 MST 2005


Author: dglassey
Date: 2005-03-28 13:05:50 -0700 (Mon, 28 Mar 2005)
New Revision: 1757

Modified:
   trunk/src/mgr/localemgr.cpp
Log:
confirm jansorgs change and replace old code with a comment
check for @ in locale name to catch e.g. @euro locales



Modified: trunk/src/mgr/localemgr.cpp
===================================================================
--- trunk/src/mgr/localemgr.cpp	2005-03-28 11:23:03 UTC (rev 1756)
+++ trunk/src/mgr/localemgr.cpp	2005-03-28 20:05:50 UTC (rev 1757)
@@ -115,15 +115,11 @@
 		}
 	}
 
-/*	char *lang = getenv ("LANG");
-	if (lang) {
-		if (strlen(lang) > 0)
-			setDefaultLocaleName(lang);
-		else stdstr(&defaultLocaleName, "en_US");
+	// Locales will be invalidated if you change the StringMgr
+	// So only use the default hardcoded locale and let the
+	// frontends change the locale if they want
+	stdstr(&defaultLocaleName, "en_US");
 
-	}
-	else*/ stdstr(&defaultLocaleName, "en_US");
-
 	if (prefixPath)
 		delete [] prefixPath;
 
@@ -239,6 +235,8 @@
 	char *tmplang=0;
 	stdstr(&tmplang, name);
 	strtok(tmplang, ".");
+	// check for @ so e.g. @euro locales are found
+	strtok(tmplang, "@");
 	// Before we set it we want to verify that it is an existing locale
 	// First check for what we ask for
 	if (getLocale(tmplang)) {



More information about the sword-cvs mailing list