File tree Expand file tree Collapse file tree 1 file changed +22
-10
lines changed
Expand file tree Collapse file tree 1 file changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -393,23 +393,35 @@ function api_get_platform_isocodes() {
393393 */
394394function api_get_text_direction ($ language = null ) {
395395 static $ text_direction = array ();
396-
397- $ language_is_supported = api_is_language_supported ($ language );
396+
397+ /*
398+ * Not necessary to validate the language because the list if rtl/ltr is harcoded
399+ *
400+ /*
401+ $language_is_supported = api_is_language_supported($language);
398402 if (!$language_is_supported || empty($language)) {
399403 $language = api_get_interface_language(false, true);
400- }
401-
404+ }*/
405+ if (empty ($ language )) {
406+ $ language = api_get_interface_language ();
407+ }
402408 if (!isset ($ text_direction [$ language ])) {
403409 $ text_direction [$ language ] = in_array (api_purify_language_id ($ language ),
404410 array (
405- 'arabic ' , 'ar ' ,
406- 'dari ' , 'prs ' ,
407- 'hebrew ' , 'he ' ,
411+ 'arabic ' ,
412+ 'ar ' ,
413+ 'dari ' ,
414+ 'prs ' ,
415+ 'hebrew ' ,
416+ 'he ' ,
408417 'iw ' ,
409- 'pashto ' , 'ps ' ,
410- 'persian ' , 'fa ' ,
418+ 'pashto ' ,
419+ 'ps ' ,
420+ 'persian ' ,
421+ 'fa ' ,
411422 'ur ' ,
412- 'yiddish ' , 'yid '
423+ 'yiddish ' ,
424+ 'yid '
413425 )
414426 ) ? 'rtl ' : 'ltr ' ;
415427 }
You can’t perform that action at this time.
0 commit comments