IDEMPIERE-2363 HTML Editor (CKEditor) shown in browser language instead of login language

This commit is contained in:
Carlos Ruiz 2014-12-16 12:21:09 -05:00
parent 2d6ac29ea2
commit c0f90d236b
2 changed files with 14 additions and 0 deletions

View File

@ -22,7 +22,9 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.logging.Level;
import java.util.regex.Matcher;
@ -57,6 +59,7 @@ import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.EMail;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkforge.ckez.CKeditor;
@ -120,6 +123,9 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
fMessage = new CKeditor();
fMessage.setCustomConfigurationsPath("/js/ckeditor/config.js");
fMessage.setToolbar("MyToolbar");
Map<String,Object> lang = new HashMap<String,Object>();
lang.put("language", Language.getLoginLanguage().getAD_Language());
fMessage.setConfig(lang);
commonInit(from, to, subject, message, attachment);
} // EmailDialog

View File

@ -12,6 +12,9 @@
*****************************************************************************/
package org.adempiere.webui.window;
import java.util.HashMap;
import java.util.Map;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Tab;
@ -21,6 +24,8 @@ import org.adempiere.webui.component.Tabpanels;
import org.adempiere.webui.component.Tabs;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.compiere.util.Env;
import org.compiere.util.Language;
import org.zkforge.ckez.CKeditor;
import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.event.Event;
@ -161,6 +166,9 @@ public class WTextEditorDialog extends Window implements EventListener<Event>{
editor = new CKeditor();
editor.setCustomConfigurationsPath("/js/ckeditor/config.js");
editor.setToolbar("MyToolbar");
Map<String,Object> lang = new HashMap<String,Object>();
lang.put("language", Language.getLoginLanguage().getAD_Language());
editor.setConfig(lang);
tabPanel.appendChild(editor);
editor.setVflex("1");
editor.setWidth("100%");