. require_once("../inc/util.inc"); require_once("../inc/translation.inc"); require_once("../inc/language_names.inc"); $languages = get_supported_languages(); if (!is_array($languages)) { error_page("Language selection not enabled. Project admins must run the update_translations.php script."); } $prefs = ""; if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) { $prefs = $_SERVER["HTTP_ACCEPT_LANGUAGE"]; $prefs = sanitize_tags($prefs); } $set_lang = get_str("set_lang", true); if ($set_lang){ if (!in_array($set_lang, $languages) && $set_lang!="auto"){ error_page("Language not supported"); } else { send_cookie('lang', $set_lang, true); header("Location: index.php"); exit; } } page_head(tra("Language selection")); if (count($languages_in_use)) { $lang_code = $languages_in_use[0]; } else { $lang_code = 'en'; } $cur_lang_desc = language_desc($lang_code); echo "

", tra( "This web site is available in several languages. The currently selected language is %1.", $cur_lang_desc ), "

", tra( "Normally the choice of language is determined by your browser's language setting, which is: %1. You can change this setting using:", "$prefs" ), "

", "

", tra( "Or you can select a language from the following menu:" ), "

" ; echo '
'; language_form($lang_code); echo '
'; echo "

", tra("Translations are done by volunteers. If your native language is missing or incomplete, %1you can help translate%2.", '', ''), "

" ; page_tail(); ?>