is_rtl should handle lang instead of code

This commit is contained in:
Diogo Cordeiro 2019-05-14 15:51:42 +01:00
parent ceae66a30f
commit d9a42550ff
1 changed files with 6 additions and 4 deletions

View File

@ -294,11 +294,13 @@ function get_nice_language_list()
* @return boolean true if language is rtl
*/
function is_rtl($lang)
function is_rtl($lang_value)
{
$all_languages = common_config('site', 'languages');
$lang = $all_languages[$lang];
return ($lang['direction'] == 'rtl');
foreach (common_config('site', 'languages') as $code => $info) {
if ($lang_value == $info['lang']) {
return $info['direction'] == 'rtl';
}
}
}
/**