MDL-76367 editor_tiny: Add missing lang direction string

TinyMCE uses a magic langstring only present in RTL languages which
makes it hard to automatically fetch from their strings.

Since it's the only magic string I can find a reference to (after
searching their codebase), I've elected to add this in the lang.php
serving layer. This allows us to use our own langstring instead of
re-declaring something that should be stored once across Moodle.
This commit is contained in:
Andrew Nicols
2022-11-18 14:31:35 +08:00
parent 6ee0d6a979
commit 899397c0af
+5
View File
@@ -185,6 +185,11 @@ class lang {
}
}
// TinyMCE uses a secret string only present in some languages to set a language direction.
// Rather than applying to only some languages, we just apply to all from our own langconfig.
// Note: Do not rely on right_to_left() as the current language is unset.
$strings['_dir'] = $stringmanager->get_string('thisdirection', 'langconfig', null, $this->lang);
return $strings;
}