fix locale support

Originally committed to SVN as r374.
This commit is contained in:
David Lamparter 2006-05-06 14:38:53 +00:00
parent dc71ec961d
commit 2c418c3cd3
2 changed files with 8 additions and 1 deletions

View File

@ -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");
}

View File

@ -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();