mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
src/system/helpers.cpp: Add function Lang2ISO639_1()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 53ef02ad2f
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-03-04 (Fri, 04 Mar 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -944,3 +944,36 @@ std::string getJFFS2MountPoint(int mtdPos)
|
|||||||
fclose(fd);
|
fclose(fd);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string Lang2ISO639_1(std::string& lang)
|
||||||
|
{
|
||||||
|
std::string ret = "";
|
||||||
|
if ((lang == "deutsch") || (lang == "bayrisch") || (lang == "ch-baslerdeutsch") || (lang == "ch-berndeutsch"))
|
||||||
|
ret = "de";
|
||||||
|
else if (lang == "english")
|
||||||
|
ret = "en";
|
||||||
|
else if (lang == "nederlands")
|
||||||
|
ret = "nl";
|
||||||
|
else if (lang == "slovak")
|
||||||
|
ret = "sk";
|
||||||
|
else if (lang == "bosanski")
|
||||||
|
ret = "bs";
|
||||||
|
else if (lang == "czech")
|
||||||
|
ret = "cs";
|
||||||
|
else if (lang == "francais")
|
||||||
|
ret = "fr";
|
||||||
|
else if (lang == "italiano")
|
||||||
|
ret = "it";
|
||||||
|
else if (lang == "polski")
|
||||||
|
ret = "pl";
|
||||||
|
else if (lang == "portugues")
|
||||||
|
ret = "pt";
|
||||||
|
else if (lang == "russkij")
|
||||||
|
ret = "ru";
|
||||||
|
else if (lang == "suomi")
|
||||||
|
ret = "fi";
|
||||||
|
else if (lang == "svenska")
|
||||||
|
ret = "sv";
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
@@ -117,5 +117,6 @@ std::vector<std::string> split(const std::string &s, char delim);
|
|||||||
bool split_config_string(const std::string &str, std::map<std::string,std::string> &smap);
|
bool split_config_string(const std::string &str, std::map<std::string,std::string> &smap);
|
||||||
|
|
||||||
std::string getJFFS2MountPoint(int mtdPos);
|
std::string getJFFS2MountPoint(int mtdPos);
|
||||||
|
std::string Lang2ISO639_1(std::string& lang);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user