Skip to content

Commit

Permalink
Supporting fallback to 'other'.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Oct 31, 2023
1 parent 7b4b06d commit 72f17cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lang/en/atto_multilang2.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
$string['customcss'] = 'CSS for delimiters';
$string['customcss_desc'] = "<br>CSS used to highlight the multi-language content delimiters.
<p><b>Attention:</b> just put the CSS BODY RULES, excluding the selectors, just as it appears in the default value.</p>";
$string['other'] = 'Other';
$string['multilang2:viewlanguagemenu'] = 'View language menu in the editor';
$string['privacy:metadata'] = 'The Multi-Language Content (v2) plugin for the atto editor does not store any personal data';
4 changes: 3 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
* @return array The JSON encoding of the installed languages.
*/
function atto_multilang2_params_for_js() {
$languages = json_encode(get_string_manager()->get_list_of_translations());
$availablelanguages = get_string_manager()->get_list_of_translations();
$availablelanguages['other'] = get_string("other", "atto_multilang2") . " (other)";
$languages = json_encode($availablelanguages);
$capability = get_capability();
$highlight = (get_config('atto_multilang2', 'highlight') === '1') ? true : false;
$css = get_config('atto_multilang2', 'customcss');
Expand Down

0 comments on commit 72f17cb

Please sign in to comment.