2006-12-01 00:38:36 +00:00
|
|
|
<?php
|
2006-12-04 17:10:39 +00:00
|
|
|
|
|
|
|
// see http://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers
|
2006-12-01 00:38:36 +00:00
|
|
|
$spoken_languages = array(
|
|
|
|
'Arabic',
|
|
|
|
'Awadhi',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Azeri',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Bengali',
|
|
|
|
'Bhojpuri',
|
|
|
|
'Burmese',
|
|
|
|
'Chinese, Gan',
|
|
|
|
'Chinese, Hakka',
|
|
|
|
'Chinese, Jinyu',
|
|
|
|
'Chinese, Mandarin',
|
|
|
|
'Chinese, Min Nan',
|
|
|
|
'Chinese, Wu',
|
|
|
|
'Chinese, Xiang',
|
|
|
|
'Chinese, Yue (Cantonese)',
|
2007-05-08 23:12:40 +00:00
|
|
|
'Czech',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Dutch',
|
|
|
|
'English',
|
|
|
|
'French',
|
|
|
|
'German',
|
|
|
|
'Gujarati',
|
|
|
|
'Hausa',
|
|
|
|
'Hindi',
|
2007-02-12 23:53:16 +00:00
|
|
|
'Hungarian/Magyar',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Italian',
|
|
|
|
'Japanese',
|
|
|
|
'Javanese',
|
|
|
|
'Kannada',
|
|
|
|
'Korean',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Lithuanian',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Maithili',
|
|
|
|
'Malayalam',
|
|
|
|
'Marathi',
|
|
|
|
'Oriya',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Punjabi',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Persian',
|
|
|
|
'Polish',
|
|
|
|
'Portuguese',
|
|
|
|
'Romanian',
|
|
|
|
'Russian',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Sundanese',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Serbo-Croatian',
|
|
|
|
'Sindi',
|
|
|
|
'Spanish',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Tagalog',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Tamil',
|
|
|
|
'Telugu',
|
|
|
|
'Thai',
|
|
|
|
'Turkish',
|
|
|
|
'Ukrainian',
|
|
|
|
'Urdu',
|
2006-12-04 17:10:39 +00:00
|
|
|
'Uzbek',
|
2006-12-01 00:38:36 +00:00
|
|
|
'Vietnamese',
|
|
|
|
'Yoruba',
|
|
|
|
);
|
|
|
|
|
|
|
|
function is_spoken_language($lang) {
|
|
|
|
global $spoken_languages;
|
|
|
|
if (!$lang) return true;
|
|
|
|
return in_array($lang, $spoken_languages);
|
|
|
|
}
|
|
|
|
|
|
|
|
function spoken_language_list($name, $val) {
|
|
|
|
global $spoken_languages;
|
|
|
|
$x = "<select name=$name>\n";
|
|
|
|
if ($val) {
|
|
|
|
$x .= "<option value=\"\">---\n";
|
|
|
|
} else {
|
|
|
|
$x .= "<option value=\"\" selected >---\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($spoken_languages as $lang) {
|
|
|
|
if ($lang == $val) {
|
|
|
|
$x .= "<option value=\"$lang\" selected>$lang\n";
|
|
|
|
} else {
|
|
|
|
$x .= "<option value=\"$lang\">$lang\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$x .= "</select>\n";
|
|
|
|
return $x;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|