. $language_names = array( array("ar", "العربية", "Arabic"), array("be", "Беларускі", "Belarusian"), array("bg", "Български", "Bulgarian"), array("ca", "Català", "Catalan"), array("cs", "Čeština ", "Czech"), array("cy", "Cymraeg", "Welsh"), array("da", "Dansk", "Danish"), array("de", "Deutsch ", "German"), array("el", "Ελληνικά", "Greek"), array("en", "English", "English"), array("es", "Español", "Spanish"), array("sa", "فارسی", "Persian"), array("fi", "Suomi", "Finnish"), array("fr", "Français", "French"), array("gl", "Galego", "Galician"), array("he", "עִבְרִית", "Hebrew"), array("hr", "Hrvatski", "Croatian"), array("hu", "Magyar", "Hungarian"), array("it", "Italiano", "Italian"), array("ja", "日本語", "Japanese"), array("ko", "한국어", "Korean"), array("lt", "Lietuvių", "Lithuanian"), array("lv", "Latviešu", "Latvian"), array("nl", "Nederlands", "Dutch"), array("pl", "Polski", "Polish"), array("pt_BR", "Português - Brasil", "Portuguese - Brazil"), array("pt_PT", "Português", "Portuguese"), array("ro", "Română", "Romanian"), array("ru", "Русский", "Russian"), array("sk", "Slovenčina", "Slovakian"), array("sl", "Slovenščina", "Slovenian"), array("sv", "Svenska", "Swedish"), array("tr", "Türkçe", "Turkish"), array("zh_CN", "简体中文", "Chinese"), array("zh_TW", "繁體中文", "Chinese (Taiwan)"), ); function language_select() { global $language_names; $supported_languages = getSupportedLanguages(); $supported_languages[] = "en"; $bd = tra("Browser default"); echo " -- language -- $bd "; if ($bd != "Browser default") echo " (Browser default)"; foreach ($language_names as $lang) { if (!in_array($lang[0], $supported_languages)) continue; if ($lang[0] == "en") { echo "".$lang[1]; } else { echo "".$lang[1]." (".$lang[2].")"; } } } // show a menu of supported languages // function language_form() { echo " "; language_select(); echo " "; } ?>