diff options
author | Johannes Schickel | 2010-11-28 02:12:33 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-11-28 02:12:33 +0000 |
commit | 1ad63b431ee031c0d4bb6d520d70103a60459d55 (patch) | |
tree | fb519ea3bf4a9f73ae832f57c0c08f62e7ecfd44 /common | |
parent | 5f7ac43a24094ce3fa87e3fc01d8f9f333233631 (diff) | |
download | scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.tar.gz scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.tar.bz2 scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.zip |
BACKEND: Switch OSystem::getSystemLanguage return type to Common::String.
This is done as discussed on -devel.
svn-id: r54516
Diffstat (limited to 'common')
-rw-r--r-- | common/system.cpp | 4 | ||||
-rw-r--r-- | common/system.h | 16 | ||||
-rw-r--r-- | common/translation.cpp | 6 |
3 files changed, 10 insertions, 16 deletions
diff --git a/common/system.cpp b/common/system.cpp index 1da5367f22..81fe761f1d 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -90,7 +90,7 @@ void OSystem::logMessage(LogMessageType::Type type, const char *message) { fflush(output); } -Common::Language OSystem::getSystemLanguage() const { - return Common::UNK_LANG; +Common::String OSystem::getSystemLanguage() const { + return "en_US"; } diff --git a/common/system.h b/common/system.h index 4870efc854..54c6fa8df7 100644 --- a/common/system.h +++ b/common/system.h @@ -30,7 +30,6 @@ #include "common/noncopyable.h" #include "common/rect.h" #include "common/list.h" // For OSystem::getSupportedFormats() -#include "common/util.h" // For Common::Language #include "graphics/pixelformat.h" @@ -1057,18 +1056,17 @@ public: * This returns the currently set up locale of the system, on which * ScummVM is run. * - * In case the locale can not be prepresented by Common::Language the - * backend should return Common::UNK_LANG. - * - * @see Common::Language - * @see Common::UNK_LANG - * - * The default implementation returns Common::UNK_LANG. + * The format of the locale is language_country. These should match + * the POSIX locale values. * + * For information about POSIX locales read here: + * http://en.wikipedia.org/wiki/Locale#POSIX-type_platforms + * + * The default implementation returns "en_US". * * @return locale of the system */ - virtual Common::Language getSystemLanguage() const; + virtual Common::String getSystemLanguage() const; //@} }; diff --git a/common/translation.cpp b/common/translation.cpp index d47e0f98d2..69824dd299 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -53,11 +53,7 @@ bool operator<(const TLanguage &l, const TLanguage &r) { TranslationManager::TranslationManager() : _currentLang(-1) { loadTranslationsInfoDat(); - const char *locale = getLanguageLocale(g_system->getSystemLanguage()); - if (!locale) - _syslang = "C"; - else - _syslang = locale; + _syslang = g_system->getSystemLanguage(); // Set the default language setLanguage(""); |