widgetfactory / jce-legacy

JCE - A Content Editor for Joomla!
4 stars 2 forks source link

[New feature] translatable [Toggle editor] #12

Open nvyush opened 7 years ago

nvyush commented 7 years ago

How about to make parameter editor.toggle_label translatable? It is simple: in the file /administrator/components/com_jce/models/editor.php in the line 171 (v.2.5.31) add JText, i.e. replace $settings['toggle_label'] = htmlspecialchars($wf->getParam('editor.toggle_label', '[Toggle Editor]', '[Toggle Editor]')); with $settings['toggle_label'] = htmlspecialchars(JText::_($wf->getParam('editor.toggle_label', '[Toggle Editor]', '[Toggle Editor]'), true));

Then one can override language constant like COM_JCE_TOGGLE_EDITOR for all needed languages and set it name at the JCE profiles.

UPD: This is backward compatible. If language constant is not set, then value of editor.toggle_label parameter will be shown.