fixes #205, thx @GreenLunar
This commit is contained in:
parent
1f70cfd5ad
commit
42200dca19
|
@ -246,11 +246,22 @@ class QvitterAction extends ApiAction
|
||||||
|
|
||||||
$lancode = substr($lan,0,strpos($lan,'.'));
|
$lancode = substr($lan,0,strpos($lan,'.'));
|
||||||
|
|
||||||
|
// for the paranthesis containing language region to work with rtl in ltr enviroment and vice versa, we add a
|
||||||
|
// special rtl or ltr html char after the paranthesis
|
||||||
|
// this list is incomplete, but if any rtl language gets a regional translation, it will probably be arabic
|
||||||
|
$rtl_or_ltr_special_char = '‎';
|
||||||
|
$base_lancode = substr($lancode,0,strpos($lancode,'_'));
|
||||||
|
if($base_lancode == 'ar'
|
||||||
|
|| $base_lancode == 'fa'
|
||||||
|
|| $base_lancode == 'he') {
|
||||||
|
$rtl_or_ltr_special_char = '‏';
|
||||||
|
}
|
||||||
|
|
||||||
// also make an array with all language names, to use for generating menu
|
// also make an array with all language names, to use for generating menu
|
||||||
$languagecodesandnames[$lancode]['english_name'] = Locale::getDisplayLanguage($lancode, 'en');
|
$languagecodesandnames[$lancode]['english_name'] = Locale::getDisplayLanguage($lancode, 'en');
|
||||||
$languagecodesandnames[$lancode]['name'] = Locale::getDisplayLanguage($lancode, $lancode);
|
$languagecodesandnames[$lancode]['name'] = Locale::getDisplayLanguage($lancode, $lancode);
|
||||||
if(Locale::getDisplayRegion($lancode, $lancode)) {
|
if(Locale::getDisplayRegion($lancode, $lancode)) {
|
||||||
$languagecodesandnames[$lancode]['name'] .= ' ('.Locale::getDisplayRegion($lancode, $lancode).')';
|
$languagecodesandnames[$lancode]['name'] .= ' ('.Locale::getDisplayRegion($lancode, $lancode).')'.$rtl_or_ltr_special_char;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ahorita meme only on quitter.es
|
// ahorita meme only on quitter.es
|
||||||
|
|
Loading…
Reference in New Issue
Block a user