|
|
|
@ -188,57 +188,3 @@ std::vector<std::wstring> plLocalization::StringToLocal(const std::wstring & loc
|
|
|
|
|
retVal[0] = localizedText; // if no tags were in the text, we assume it to be English
|
|
|
|
|
return retVal; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#include "hsWindows.h" |
|
|
|
|
|
|
|
|
|
void plLocalization::SetDefaultLanguage() |
|
|
|
|
{ |
|
|
|
|
fLanguage = kEnglish; |
|
|
|
|
#if 0 // disable all languages
|
|
|
|
|
#ifdef HS_BUILD_FOR_WIN32 |
|
|
|
|
HKEY hLocalKey = NULL; |
|
|
|
|
HKEY hMSKey = NULL; |
|
|
|
|
HKEY hWindowsKey = NULL; |
|
|
|
|
HKEY hCurVerKey = NULL; |
|
|
|
|
HKEY hUninstKey = NULL; |
|
|
|
|
HKEY hUruKey = NULL; |
|
|
|
|
|
|
|
|
|
#define RegOpen(key, retKey, subKeyName) RegOpenKeyEx(key, subKeyName, 0, KEY_READ, &retKey) == ERROR_SUCCESS |
|
|
|
|
|
|
|
|
|
if (RegOpen(HKEY_LOCAL_MACHINE, hLocalKey, "software") && |
|
|
|
|
RegOpen(hLocalKey, hMSKey, "microsoft") && |
|
|
|
|
RegOpen(hMSKey, hWindowsKey, "windows") && |
|
|
|
|
RegOpen(hWindowsKey, hCurVerKey, "currentversion") && |
|
|
|
|
RegOpen(hCurVerKey, hUninstKey, "uninstall") && |
|
|
|
|
RegOpen(hUninstKey, hUruKey, "Uru - Ages Beyond Myst")) |
|
|
|
|
{ |
|
|
|
|
char value[20]; |
|
|
|
|
DWORD bufsize = sizeof(value); |
|
|
|
|
if (RegQueryValueEx(hUruKey, "Lang", NULL, NULL, (LPBYTE)value, &bufsize) == ERROR_SUCCESS) |
|
|
|
|
{ |
|
|
|
|
if (hsStrEQ(value, "en")) |
|
|
|
|
fLanguage = kEnglish; |
|
|
|
|
else if (hsStrEQ(value, "fr")) |
|
|
|
|
fLanguage = kFrench; |
|
|
|
|
else if (hsStrEQ(value, "de")) |
|
|
|
|
fLanguage = kGerman; |
|
|
|
|
else if (hsStrEQ(value, "es")) |
|
|
|
|
fLanguage = kSpanish; |
|
|
|
|
else if (hsStrEQ(value, "it")) |
|
|
|
|
fLanguage = kItalian; |
|
|
|
|
else if (hsStrEQ(value, "jp")) |
|
|
|
|
fLanguage = kJapanese; |
|
|
|
|
else |
|
|
|
|
fLanguage = kEnglish; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RegCloseKey(hLocalKey); |
|
|
|
|
RegCloseKey(hMSKey); |
|
|
|
|
RegCloseKey(hWindowsKey); |
|
|
|
|
RegCloseKey(hCurVerKey); |
|
|
|
|
RegCloseKey(hUninstKey); |
|
|
|
|
RegCloseKey(hUruKey); |
|
|
|
|
#endif // HS_BUILD_FOR_WIN32
|
|
|
|
|
#endif // 0
|
|
|
|
|
} |
|
|
|
|