summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2699a90)
raw | patch | inline | side by side (parent: 2699a90)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Aug 2007 12:08:48 +0000 (12:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 8 Aug 2007 12:08:48 +0000 (12:08 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7002 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/contrib/gosa.conf b/contrib/gosa.conf
index aa7c0b5940354568a906b358da8dcb64536a3f8a..cc112e0e9b65141a5df7369e5aa214757ada858f 100644 (file)
--- a/contrib/gosa.conf
+++ b/contrib/gosa.conf
password="{$cv.password}" />
</location>
- <language name="German" tag="de_DE" />
- <language name="Russian" tag="ru_RU" />
- <language name="Spanish" tag="es_ES" />
- <language name="French" tag="fr_FR" />
- <language name="Dutch" tag="nl_NL" />
- <language name="English" tag="en_EN" />
- <language name="Italian" tag="it_IT" />
- <language name="Polish" tag="pl_PL" />
-
<faxformat type="pdf" />
<faxformat type="ps" />
<faxformat type="png" />
index a7d3a53b6a0e17e7001f2bde8a2ab0560a667325..c466c97970dce148f5869dea74ccf82e0a8683a9 100644 (file)
--- a/include/class_config.inc
+++ b/include/class_config.inc
/* Configuration data */
var $data= array( 'TABS' => array(), 'LOCATIONS' => array(), 'SERVERS' => array(),
- 'MAIN' => array( 'LANGUAGES' => array(), 'FAXFORMATS' => array() ),
+ 'MAIN' => array( 'FAXFORMATS' => array() ),
'MENU' => array(), 'SERVICE' => array());
var $basedir= "";
}
break;
- /* Handle language */
- case 'LANGUAGE':
- if ($this->tags[$this->level-2] == 'MAIN'){
- /* Add languages */
- $this->data['MAIN']['LANGUAGES'][$attrs['NAME']]=
- $attrs['TAG'];
- }
- break;
-
/* Handle faxformat */
case 'FAXFORMAT':
if ($this->tags[$this->level-2] == 'MAIN'){
diff --git a/include/functions.inc b/include/functions.inc
index aec454e0349d02cd00ebefc85329dd0a16de0179..a82f59d4f1f32707e03816c535a0259210e5fed4 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
+
+function get_languages($languages_in_own_language = FALSE,$strip_region_tag = FALSE)
+{
+ $tmp = array(
+ "de_DE" => "German",
+ "fr_FR" => "French",
+ "it_IT" => "Italian",
+ "es_ES" => "Spanish",
+ "en_US" => "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);
+ if($strip_region_tag){
+ $ret[preg_replace("/^([^_]*).*$/","\\1",$key)] = _($name)." (".$name.")";
+ }else{
+ $ret[$key] = _($name)." (".$name.")";
+ }
+ }
+ setlocale(LC_ALL, $old_lang);
+ }else{
+ foreach($tmp as $key => $name){
+ if($strip_region_tag){
+ $ret[preg_replace("/^([^_]*).*/","\\1",$key)] = _($name);
+ }else{
+ $ret[$key] = _($name);
+ }
+ }
+ }
+ return($ret);
+}
+
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index 813981e8eea8ecc505873511a7105c8417150d5e..4a24a0b682b99db46b871bb9be15be28fd9d54aa 100644 (file)
/* Assign samrty variables */
$smarty= get_smarty();
- $smarty->assign("goFonQueueLanguageOptions",array('de'=>_('German')));
+ $smarty->assign("goFonQueueLanguageOptions",get_languages(FALSE,TRUE));
$smarty->assign("goFonQueueStrategyOptions", $this->goFonQueueStrategyOptions);
/* Set acls */
diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc
index 985c13e07aab53ca4190cafc2ce130b33eeed120..ade7e57a7ad186d59b238f21c51128e1c13a6bc4 100644 (file)
/* Show main page */
- $smarty->assign("languages", $this->config->data['MAIN']['LANGUAGES']);
+ $smarty->assign("languages", get_languages());
$smarty->assign("formats", $this->config->data['MAIN']['FAXFORMATS']);
$smarty->assign("printers", $this->printerList);
index d7587ef2183b45c676aa47b9d884b01e4ded18c9..cb56a6c11690a8cf69caaf99031ee56b4f316792 100644 (file)
{render acl=$goFaxLanguageACL}
<select size="1" name="goFaxLanguage" id="goFaxLanguage"
title="{t}Specify the GOfax communication language for fax to mail gateway{/t}">
- {html_options values=$languages output=$languages selected=$goFaxLanguage}
+ {html_options options=$languages selected=$goFaxLanguage}
</select>
{/render}
index 74b19cd1c5fd5a1966cd796db181717a88a15190..ead7b4a6e74437a224acb2a2fc6c0e2062fefb57 100644 (file)
$sex= array(0 => " ", "F" => _("female"), "M" => _("male"));
$smarty->assign("gender_list", $sex);
- /* Assign prefered langage */
- $language= array(0 => " ", "fr_FR" => ("fr_FR"), "en_EN" => ("en_EN"),
- "de_DE" => ("de_DE"), "it_IT" => ("it_IT"),
- "nl_NL" => ("nl_NL"), "ru_RU" => ("ru_RU"),
- "zh_CN" => ("zh_CN"));
+ $language= array_merge(array(0 => " ") ,get_languages());
$smarty->assign("preferredLanguage_list", $language);
/* Get random number for pictures */
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 10d575bcb96d231b1ccdc69a8c1a641eb235b4c2..94b8a1b5880ca560f82ddde731c9f5201b7a403c 100644 (file)
var $shadowInactive= "0";
var $shadowExpire= "0";
var $gosaDefaultPrinter= "";
- var $gosaDefaultLanguage= "";
var $accessTo= array();
var $trustModel= "";
var $attributes = array("homeDirectory", "loginShell", "uidNumber", "gidNumber", "gecos",
"shadowMin", "shadowMax", "shadowWarning", "shadowInactive", "shadowLastChange",
- "shadowExpire", "gosaDefaultPrinter", "gosaDefaultLanguage", "uid","accessTo","trustModel");
+ "shadowExpire", "gosaDefaultPrinter", "uid","accessTo","trustModel");
var $objectclasses= array("posixAccount", "shadowAccount");
} else {
$smarty->assign("groups", "");
}
- $smarty->assign("languages", $this->config->data['MAIN']['LANGUAGES']);
/* Avoid "Undefined index: forceMode" */
$smarty->assign("forceMode", "");
index 986c3354251792de7d6930210bf8036a456729b1..e1b5e72ab61c11b2487740b8afb5063b924d967f 100644 (file)
function execute()
{
- $this->languages = array("" => _("Automatic"),
- "de_DE" => _("German"),
- "fr_FR" => _("French"),
- "en_EN" => _("English"),
- "zh_CN" => _("Chinese"),
- "ru_RU" => _("Russian"));
+ $this->languages = array_merge(array("" => _("Automatic")),get_languages(TRUE));
asort($this->languages);
$smarty = get_smarty();
$smarty->assign("languages", $this->languages);