From 261ff1fa32cb75254d68d214f13f8a5aaec33962 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Feb 2012 17:30:36 +0300 Subject: Move language functions to langs.cpp and langs.h files. --- src/utils/stringutils.cpp | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'src/utils/stringutils.cpp') diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 08bcac9e6..b07a4e367 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -486,62 +486,6 @@ std::string combineDye2(std::string file, std::string dye) } } -std::vector getLang() -{ - std::vector langs; - - std::string lang = config.getValue("lang", "").c_str(); - if (lang.empty()) - { - char *lng = getenv("LANG"); - if (!lng) - return langs; - lang = lng; - } - - int dot = lang.find("."); - if (dot != (signed)std::string::npos) - lang = lang.substr(0, dot); - langs.push_back(lang); - dot = lang.find("_"); - if (dot != (signed)std::string::npos) - langs.push_back(lang.substr(0, dot)); - return langs; -} - -std::string getLangSimple() -{ - std::string lang = config.getValue("lang", "").c_str(); - if (lang.empty()) - { - char *lng = getenv("LANG"); - if (!lng) - return ""; - return lng; - } - return lang; -} - -std::string getLangShort() -{ - std::string lang = config.getValue("lang", "").c_str(); - if (lang.empty()) - { - char *lng = getenv("LANG"); - if (!lng) - return ""; - lang = lng; - } - - int dot = lang.find("."); - if (dot != (signed)std::string::npos) - lang = lang.substr(0, dot); - dot = lang.find("_"); - if (dot != (signed)std::string::npos) - return lang.substr(0, dot); - return lang; -} - std::string packList(std::list &list) { std::list::const_iterator i = list.begin(); -- cgit v1.2.3-70-g09d2