From 0e7ccb896dafb69664fb313c63bdb8fbe0ea82d1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 28 Jun 2010 15:17:10 +0000 Subject: 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 --- common/translation.cpp | 4 ++++ common/translation.h | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'common') 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; }; -- cgit v1.2.3