forked from mia/Aegisub
fix locale support
Originally committed to SVN as r374.
This commit is contained in:
parent
dc71ec961d
commit
2c418c3cd3
2 changed files with 8 additions and 1 deletions
|
@ -64,10 +64,13 @@ void AegisubLocale::Init(int language) {
|
||||||
if (locale) delete locale;
|
if (locale) delete locale;
|
||||||
curCode = language;
|
curCode = language;
|
||||||
locale = new wxLocale(language);
|
locale = new wxLocale(language);
|
||||||
|
#ifdef WIN32
|
||||||
locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/"));
|
locale->AddCatalogLookupPathPrefix(AegisubApp::folderName + _T("locale/"));
|
||||||
|
#endif
|
||||||
locale->AddCatalog(_T("aegisub"));
|
locale->AddCatalog(_T("aegisub"));
|
||||||
locale->AddCatalog(_T("wxstd"));
|
locale->AddCatalog(_T("wxstd"));
|
||||||
setlocale(LC_NUMERIC, "English");
|
setlocale(LC_NUMERIC, "C");
|
||||||
|
setlocale(LC_CTYPE, "C");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,7 @@ bool AegisubApp::OnInit() {
|
||||||
Hotkeys.SetFile(folderName + _T("/hotkeys.dat"));
|
Hotkeys.SetFile(folderName + _T("/hotkeys.dat"));
|
||||||
Hotkeys.Load();
|
Hotkeys.Load();
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
// Set locale
|
// Set locale
|
||||||
int lang = Options.AsInt(_T("Locale Code"));
|
int lang = Options.AsInt(_T("Locale Code"));
|
||||||
if (lang == -1) {
|
if (lang == -1) {
|
||||||
|
@ -95,6 +96,9 @@ bool AegisubApp::OnInit() {
|
||||||
Options.Save();
|
Options.Save();
|
||||||
}
|
}
|
||||||
locale.Init(lang);
|
locale.Init(lang);
|
||||||
|
#else
|
||||||
|
locale.Init(wxLocale::GetSystemLanguage());
|
||||||
|
#endif
|
||||||
|
|
||||||
// Load export filters
|
// Load export filters
|
||||||
AssExportFilterChain::PrepareFilters();
|
AssExportFilterChain::PrepareFilters();
|
||||||
|
|
Loading…
Reference in a new issue