Skip to content

Commit

Permalink
Configuration setting for languages to use in CKE5 plugin TextPartLan…
Browse files Browse the repository at this point in the history
…guage
  • Loading branch information
chrieinv committed Feb 28, 2025
1 parent bd0458a commit 317945b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getEditorSettings(): array
'mathtype',
],
'textPartLanguages' =>
collect(['en', 'no', 'nn', 'sme', 'sma'])
collect(explode(',', config('h5p.ckeditor.textPartLanguages', '')))
->map(fn(string $language) => [
'title' => locale_get_display_name($language, app()->getLocale()),
'languageCode' => $language,
Expand Down
3 changes: 3 additions & 0 deletions sourcecode/apis/contentauthor/config/h5p.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@

// one of 'null', 'nynorskroboten', 'nynorobot'
'translator' => env('H5P_TRANSLATOR', env('H5P_NYNORSK_ADAPTER', 'null')),
'ckeditor' => [
'textPartLanguages' => env("H5P_CKEDITOR_TEXT_PART_LANGUAGES", 'en,nb,nn'),
],
];

0 comments on commit 317945b

Please sign in to comment.