本文整理汇总了PHP中SE_Language::_languages方法的典型用法代码示例。如果您正苦于以下问题:PHP SE_Language::_languages方法的具体用法?PHP SE_Language::_languages怎么用?PHP SE_Language::_languages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SE_Language
的用法示例。
在下文中一共展示了SE_Language::_languages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: se_languages
$language_code = $_POST['language_code'];
$language_setlocale = $_POST['language_setlocale'];
$language_autodetect_regex = $_POST['language_autodetect_regex'];
if (trim($language_name) != "") {
if ($language_id != 0) {
$database->database_query("UPDATE se_languages SET language_name='{$language_name}', language_code='{$language_code}', language_setlocale='{$language_setlocale}', language_autodetect_regex='{$language_autodetect_regex}' WHERE language_id='{$language_id}'");
} else {
$database->database_query("INSERT INTO se_languages (language_name, language_code, language_setlocale, language_autodetect_regex) VALUES ('{$language_name}', '{$language_code}', '{$language_setlocale}', '{$language_autodetect_regex}')");
}
}
SE_Language::_languages();
// DELETE LANGUAGE
} elseif ($task == "delete") {
$language_id = $_GET['language_id'];
$database->database_query("DELETE FROM se_languages, se_languagevars USING se_languages LEFT JOIN se_languagevars ON se_languages.language_id=se_languagevars.languagevar_language_id WHERE language_id='{$language_id}' AND language_default<>'1'");
SE_Language::_languages();
// SAVE CHANGES
} elseif ($task == "dosave") {
$setting[setting_lang_allow] = $_POST['setting_lang_allow'];
$setting[setting_lang_anonymous] = $_POST['setting_lang_anonymous'];
$setting[setting_lang_autodetect] = $_POST['setting_lang_autodetect'];
$database->database_query("UPDATE se_settings SET setting_lang_allow='{$setting['setting_lang_allow']}',\r\n\t\t\t\t\t\tsetting_lang_anonymous='{$setting['setting_lang_anonymous']}',\r\n\t\t\t\t\t\tsetting_lang_autodetect='{$setting['setting_lang_autodetect']}'");
// RESET LANGUAGE
SE_Language::select($admin);
header("Content-Language: " . SE_Language::info('language_code'));
}
// GET LANGUAGE PACK LIST
$lang_packlist = SE_Language::list_packs();
ksort($lang_packlist);
$lang_packlist = array_values($lang_packlist);
// GET AVAILABLE LOCALE OPTIONS