From 92311f100efe888df9f8101d22ba9f2d7b483074 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Aug 2011 19:04:43 +0300 Subject: Enable japanese language in gettext. Add ability to use japanese font if current locale is japan locale. --- src/gui/gui.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/gui/gui.cpp') 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 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"); -- cgit v1.2.3-60-g2f50