summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-08-16 19:04:43 +0300
committerAndrei Karas <akaras@inbox.ru>2011-08-16 19:04:43 +0300
commit92311f100efe888df9f8101d22ba9f2d7b483074 (patch)
treef59dcc185fd6e952b52607c164575a4c37052865 /src/gui/gui.cpp
parentb1f8a2eaab592b59b5946bdbe38f0d8f775cc434 (diff)
downloadmanaplus-92311f100efe888df9f8101d22ba9f2d7b483074.tar.gz
manaplus-92311f100efe888df9f8101d22ba9f2d7b483074.tar.bz2
manaplus-92311f100efe888df9f8101d22ba9f2d7b483074.tar.xz
manaplus-92311f100efe888df9f8101d22ba9f2d7b483074.zip
Enable japanese language in gettext.
Add ability to use japanese font if current locale is japan locale.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 3e4ec764f..7d38b1025 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -107,9 +107,18 @@ Gui::Gui(Graphics *graphics):
// Set global font
const int fontSize = config.getIntValue("fontSize");
+
std::string fontFile = config.getValue("font", "");
-// may be here need get paths from paths.getValue?
-// std::string path = resman->getPath(fontFile);
+
+ std::vector<std::string> langs = getLang();
+ if (!langs.empty() && langs[0].size() > 3
+ && langs[0].substr(0, 3) == "ja_")
+ {
+ fontFile = config.getValue("japanFont", "");
+ if (fontFile.empty())
+ fontFile = branding.getStringValue("japanFont");
+ }
+
if (fontFile.empty())
fontFile = branding.getStringValue("font");