. require_once("../inc/util.inc"); require_once("../inc/translation.inc"); $languages = getSupportedLanguages(); if (!is_array($languages)) { error_page("Language selection not enabled. Project admins must run the update_translations.php script."); } $prefs = $_SERVER["HTTP_ACCEPT_LANGUAGE"]; $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")); echo "

", tra("This web site is available in several languages. ". "The currently selected language is: %1 (%2).", "".tra("LANG_NAME_INTERNATIONAL")."", tra("LANG_NAME_NATIVE")), "

", "

", 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 by clicking on one of the links. ". "This will send your browser a cookie; ". "make sure your browser accepts cookies from our domain."), "

" ; start_table(); row2(tra("Language symbol"), tra("Language name (click to select)")); row2("", "".tra("Use browser language setting")."" ); sort($languages); foreach ($languages as $language) { $inter = tr_specific("LANG_NAME_INTERNATIONAL", $language); $native = tr_specific("LANG_NAME_NATIVE", $language); row2( "$language", "$inter ($native)" ); } end_table(); echo "

", tra("Translations are done by volunteers. If your native language is not here, %1you can provide a translation%2.", '', ''), "

" ; page_tail(); ?>