From 2c418c3cd394ba453c194b46a37daf7624d67bd6 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 6 May 2006 14:38:53 +0000 Subject: [PATCH] fix locale support Originally committed to SVN as r374. --- core/aegisublocale.cpp | 5 ++++- core/main.cpp | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/aegisublocale.cpp b/core/aegisublocale.cpp index b077d8a03..a274bd269 100644 --- a/core/aegisublocale.cpp +++ b/core/aegisublocale.cpp @@ -64,10 +64,13 @@ void AegisubLocale::Init(int language) { if (locale) delete locale; curCode = language; locale = new wxLocale(language); +#ifdef WIN32 locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/")); +#endif locale->AddCatalog(_T("aegisub")); locale->AddCatalog(_T("wxstd")); - setlocale(LC_NUMERIC, "English"); + setlocale(LC_NUMERIC, "C"); + setlocale(LC_CTYPE, "C"); } diff --git a/core/main.cpp b/core/main.cpp index 7c6465550..f43a5b4c0 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -87,6 +87,7 @@ bool AegisubApp::OnInit() { Hotkeys.SetFile(folderName + _T("/hotkeys.dat")); Hotkeys.Load(); +#ifdef WIN32 // Set locale int lang = Options.AsInt(_T("Locale Code")); if (lang == -1) { @@ -95,6 +96,9 @@ bool AegisubApp::OnInit() { Options.Save(); } locale.Init(lang); +#else + locale.Init(wxLocale::GetSystemLanguage()); +#endif // Load export filters AssExportFilterChain::PrepareFilters();