/////////////////////////////////////////////////////////////////////////////
// Name: src/common/intl.cpp
-// Purpose: Internationalization and localisation for wxWindows
+// Purpose: Internationalization and localisation for wxWidgets
// Author: Vadim Zeitlin
// Modified by: Michael N. Filippov <michael@idisys.iae.nsk.su>
// (2003/09/30 - PluralForms support)
#pragma option -O1
#endif
+#ifdef __EMX__
+// The following define is needed by Innotek's libc to
+// make the definition of struct localeconv available.
+#define __INTERNAL_DEFS
+#endif
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include <langinfo.h>
#endif
-// wxWindows
+// wxWidgets
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/intl.h"
}
-wxLocale::wxLocale()
+void wxLocale::DoCommonInit()
{
m_pszOldLocale = NULL;
m_pMsgCat = NULL;
// TODO: how to find languageId
// SetLocaleInfo(languageId, SORT_DEFAULT, localeName);
#else
- m_pszOldLocale = wxSetlocale(LC_ALL, szLocale);
- if ( m_pszOldLocale )
- m_pszOldLocale = wxStrdup(m_pszOldLocale);
+ wxMB2WXbuf oldLocale = wxSetlocale(LC_ALL, szLocale);
+ if ( oldLocale )
+ m_pszOldLocale = wxStrdup(oldLocale);
+ else
+ m_pszOldLocale = NULL;
#endif
if ( m_pszOldLocale == NULL )
// save the old locale to be able to restore it later
m_pOldLocale = wxSetLocale(this);
- // load the default catalog with wxWindows standard messages
+ // load the default catalog with wxWidgets standard messages
m_pMsgCat = NULL;
bool bOk = TRUE;
if ( bLoadDefault )
#if defined(__WIN32__) && !defined(__WXMICROWIN__)
UINT codepage = ::GetACP();
- // wxWindows only knows about CP1250-1257, 932, 936, 949, 950
+ // wxWidgets only knows about CP1250-1257, 932, 936, 949, 950
if ( codepage >= 1250 && codepage <= 1257 )
{
return (wxFontEncoding)(wxFONTENCODING_CP1250 + codepage - 1250);
LNG(wxLANGUAGE_BURMESE, "my" , 0 , 0 , "Burmese")
LNG(wxLANGUAGE_CAMBODIAN, "km" , 0 , 0 , "Cambodian")
LNG(wxLANGUAGE_CATALAN, "ca_ES", LANG_CATALAN , SUBLANG_DEFAULT , "Catalan")
- LNG(wxLANGUAGE_CHINESE, "zh_CN", LANG_CHINESE , SUBLANG_DEFAULT , "Chinese")
+ LNG(wxLANGUAGE_CHINESE, "zh_TW", LANG_CHINESE , SUBLANG_DEFAULT , "Chinese")
LNG(wxLANGUAGE_CHINESE_SIMPLIFIED, "zh_CN", LANG_CHINESE , SUBLANG_CHINESE_SIMPLIFIED , "Chinese (Simplified)")
LNG(wxLANGUAGE_CHINESE_TRADITIONAL, "zh_TW", LANG_CHINESE , SUBLANG_CHINESE_TRADITIONAL , "Chinese (Traditional)")
LNG(wxLANGUAGE_CHINESE_HONGKONG, "zh_HK", LANG_CHINESE , SUBLANG_CHINESE_HONGKONG , "Chinese (Hongkong)")