topical media & game development 
  
  
    
    
  
professional-program-14-Locales-Locales.c
? / 
professional-program-14-Locales-Locales.c
  include <iostream>
  include <string>
  include <locale>
  
  using namespace std;
  
  int main(int argc, char** argv)
  {
      locale loc("");
  
      if (loc.name().find("en_US") == string::npos &&
                  loc.name().find("United States") == string::npos) {
          wcout << L"Welcome non-U.S. user!" << endl;
      } else {
          wcout << L"Welcome U.S. user!" << endl;
      }
  }
  
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.