From e8974c081644f9a66215cee34335772643cf16ff Mon Sep 17 00:00:00 2001 From: lvillanne-recia Date: Wed, 22 Feb 2023 14:03:34 +0100 Subject: [PATCH] feat: add language param to editorConfig Copied from : https://github.com/ONLYOFFICE/moodle-mod_onlyofficeeditor/commit/eed5736dd3cae5137c4b0d9b5ef4e2de0f7c040e https://github.com/ONLYOFFICE/moodle-mod_onlyofficeeditor/commit/dc51347df283e707fe9135d4c1c3c19a1a9b3781 --- classes/editor.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/editor.php b/classes/editor.php index f52343b..4197bc7 100644 --- a/classes/editor.php +++ b/classes/editor.php @@ -99,6 +99,7 @@ public function config() { $user['id'] = $USER->id; $user['name'] = \fullname($USER); $editorconfig['user'] = $user; + $editorconfig['lang'] = stristr($USER->lang, '_', true) !== false ? stristr($USER->lang, '_', true) : $USER->lang; // customization $customization = [];