diff options
author | Eugene Sandulenko | 2010-06-28 15:17:10 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-06-28 15:17:10 +0000 |
commit | 0e7ccb896dafb69664fb313c63bdb8fbe0ea82d1 (patch) | |
tree | d0672018e44e371b64f49901e2dea18000260cd4 /common | |
parent | 8410dbab539a8c278b29e9047bd5c192a3048e32 (diff) | |
download | scummvm-rg350-0e7ccb896dafb69664fb313c63bdb8fbe0ea82d1.tar.gz scummvm-rg350-0e7ccb896dafb69664fb313c63bdb8fbe0ea82d1.tar.bz2 scummvm-rg350-0e7ccb896dafb69664fb313c63bdb8fbe0ea82d1.zip |
i18n: Add support for locale-dependent fonts
Currently it ws not decided where to put fonts, but if you put BDF files into
themepath, they will get picked up.
The font name has to contain same codepage specification as in the .po file,
i.e. fixed5x8-iso-8859-5.bdf for Cyrillic codepage. In case the font does not
exist, default will be used.
All built in fonts get proper names.
TODO: Currently there is a bug with our font cacher. Font clR6x12-iso-8859-5
is empty after loading from FCC file. Reason is unknown.
svn-id: r50448
Diffstat (limited to 'common')
-rw-r--r-- | common/translation.cpp | 4 | ||||
-rw-r--r-- | common/translation.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/common/translation.cpp b/common/translation.cpp index 3c5ff4d3c7..093f26510f 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -130,6 +130,10 @@ const char *TranslationManager::getTranslation(const char *message) { return po2c_gettext(message); } +const char *TranslationManager::getCurrentCharset() { + return po2c_getcharset(); +} + String TranslationManager::getTranslation(const String &message) { return po2c_gettext(message.c_str()); } diff --git a/common/translation.h b/common/translation.h index 0722ae44ae..277ac6f5c4 100644 --- a/common/translation.h +++ b/common/translation.h @@ -121,6 +121,11 @@ public: */ const TLangArray getSupportedLanguages() const; + /** + * Returns charset specified by selected translation language + */ + const char *getCurrentCharset(); + private: Common::String _syslang; }; |