diff --git a/lang/en/langconfig.php b/lang/en/langconfig.php index 71d0561021e58..f30a6477ccfd6 100644 --- a/lang/en/langconfig.php +++ b/lang/en/langconfig.php @@ -41,6 +41,8 @@ $string['parentlanguage'] = ''; $string['pm'] = 'pm'; $string['pmcaps'] = 'PM'; +// Direction of the question mark icon for this language. Set to 'rtl' if the language needs to display it in right-to-left. +$string['questionicondirection'] = 'ltr'; $string['strftimedate'] = '%d %B %Y'; $string['strftimedatemonthabbr'] = '%d %b %Y'; $string['strftimedatemonthtimeshort'] = '%d %b %Y, %I:%M'; @@ -64,7 +66,6 @@ $string['strftimetime24'] = '%H:%M'; $string['thisdirection'] = 'ltr'; $string['thisdirectionvertical'] = 'btt'; -$string['thisicondirection'] = 'standard'; $string['thislanguage'] = 'English'; $string['thislanguageint'] = 'English'; $string['thousandssep'] = ','; diff --git a/lib/classes/output/icon_system_fontawesome.php b/lib/classes/output/icon_system_fontawesome.php index 7532cd04acd29..b4582359a4b40 100644 --- a/lib/classes/output/icon_system_fontawesome.php +++ b/lib/classes/output/icon_system_fontawesome.php @@ -497,9 +497,8 @@ public function render_pix_icon(renderer_base $output, pix_icon $icon) { $data['aria-hidden'] = $icon->attributes['aria-hidden']; } - // Define the orientation of the question mark in right-to-left languages. - $mirror = get_string('thisicondirection', 'langconfig'); - if ($mirror == 'mirror' && (strpos($data['key'], 'fa-question') !== false)) { + // Flip the orientation of the question mark if the value of the `questionicondirection` lang config string is set to `rtl`. + if (strpos($data['key'], 'fa-question') !== false && get_string('questionicondirection', 'langconfig') === 'rtl') { $data['extraclasses'] = "fa-flip-horizontal"; }