core,dms,xhtml_syle: support language in editor gadgets (CKEditor and pdf.js)
A new option render option, "language" is passed to the gadget. It is a two letter code as used by Localier. Both CKEditor and pdf.js have support for translations and already include translations for many languages. Before this change, they were auto detecting the browser language and displaying in the browser language, ignoring the language that was selected in ERP5. With this change, they use the language selected in ERP5. For CKEditor, we need to set the language only it is actually supported, otherwise CKEditor crash. pdf.js does not this, but we had to call ourselves initialize - which is probably better, because it was a promise not awaited.
Showing
Please register or sign in to comment