diff --git a/include/functions.inc b/include/functions.inc
index d52aa1e23e083f69f537d6575f8e0a59c5a83bac..ab5f5db9d9559d7c97daae9e5727480e6da31204 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
return ($vendor);
}
+
+function get_languages($languages_in_own_language = FALSE)
+{
+ $tmp = array(
+ "de_DE" => "German",
+ "fr_FR" => "French",
+ "it_IT" => "Italian",
+ "es_ES" => "Spanish",
+ "en_EN" => "English",
+ "nl_NL" => "Dutch",
+ "pl_PL" => "Polish",
+ "sv_SE" => "Swedish",
+ "zh_CN" => "Chinese",
+ "ru_RU" => "Russian");
+
+ $ret = array();
+ if($languages_in_own_language){
+ $old_lang = setlocale(LC_ALL, 0);
+ foreach($tmp as $key => $name){
+ $lang = $key.".UTF-8";
+ setlocale(LC_ALL, $lang);
+ $ret[$key] = _($name);
+ }
+ setlocale(LC_ALL, $old_lang);
+ }else{
+ foreach($tmp as $key => $name){
+ $ret[$key] = _($name);
+ }
+ }
+ return($ret);
+}
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>