Internationalization > Locale Requirements > Current Default Locale
 
Current Default Locale
Your system will have a default locale. Normally, your default locale should be set to the language you want to use. To find out the current default locale on your system, you can run one of the following programs:
On UNIX Systems
// -------------------------------------------------------------- -*- C++ -*-
// File: doc/fondation/userman/src/internationalization/checkUnixLocale.cpp
// --------------------------------------------------------------------------
// Copyright (C) 1990-2008.
// All Rights Reserved.
// --------------------------------------------------------------------------
 
#include <locale.h>
#include <stdio.h>
#include <langinfo.h>
#if defined(linux) && !defined(CODESET)
#define CODESET _NL_CTYPE_CODESET_NAME
#endif /* linux */
 
int main()
{
char* loc = setlocale(LC_ALL, "");
if (loc) {
printf("default locale: %s\n",loc);
printf("encoding %s\n", nl_langinfo(CODESET));
} else
printf("System does not support this locale\n");
return 0;
}
 
If your system is set to the French language, here is an example of what you will get on HP‑UX:
default locale: fr_FR.iso88591 fr_FR.iso88591 fr_FR.iso88591
fr_FR.iso88591 fr_FR.iso88591 fr_FR.iso88591
On Solaris, you will get:
default locale: fr
On Microsoft Windows Systems
// -------------------------------------------------------------- -*- C++ -*-
// File: doc/foundation/userman/src/internationalization/checkWindowsLocale.cpp
// --------------------------------------------------------------------------
// Copyright (C) 1990-2008.
// All Rights Reserved.
// --------------------------------------------------------------------------
 
#include <locale.h>
#include <stdio.h>
#include <windows.h>
 
int main(int argc, char* argv[])
{
printf("default locale: %s\n", setlocale(LC_ALL, ""));
printf("encoding %d\n", GetACP());
return 0;
}
 
 
On Windows XP, if your regional setting has been set to French (Standard), you will get:
default locale: French_France.1252
encoding 1252

Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.