Browse Source

韩文国际化

master
xiaxiang 9 years ago
parent
commit
474f4da1df
  1. 5
      designer_base/src/com/fr/design/actions/file/LocalePane.java
  2. 31
      designer_base/src/com/fr/design/actions/file/PreferencePane.java

5
designer_base/src/com/fr/design/actions/file/LocalePane.java

@ -48,6 +48,7 @@ public class LocalePane extends BasicPane {
private static final String CN = "fr_zh_CN.properties";
private static final String JP = "fr_ja_JP.properties";
private static final String TW = "fr_zh_TW.properties";
private static final String KR = "fr_ko_KR.properties";
private static final String PREFIX = "fr_";
private static final int LOCALE_NAME_LEN = 5;
@ -128,6 +129,7 @@ public class LocalePane extends BasicPane {
Properties cn = loadLocaleProperties(CN);
Properties jp = loadLocaleProperties(JP);
Properties tw = loadLocaleProperties(TW);
Properties kr = loadLocaleProperties(KR);
Set<String> keys = fr.stringPropertyNames();
List<String> sortKeys = new ArrayList<String>(keys);
@ -138,6 +140,7 @@ public class LocalePane extends BasicPane {
Vector<String> cnVector = new Vector<String>();
Vector<String> jpVector = new Vector<String>();
Vector<String> twVector = new Vector<String>();
Vector<String> krVector = new Vector<String>();
for (String key : sortKeys) {
keyVector.add(key);
valueVector.add(fr.getProperty(key));
@ -145,6 +148,7 @@ public class LocalePane extends BasicPane {
cnVector.add(cn.getProperty(key));
jpVector.add(jp.getProperty(key));
twVector.add(tw.getProperty(key));
krVector.add(kr.getProperty(key));
}
predefineTableModel.addColumn(Inter.getLocText("Key"), keyVector);
predefineTableModel.addColumn(Inter.getLocText("Value"), valueVector);
@ -152,6 +156,7 @@ public class LocalePane extends BasicPane {
predefineTableModel.addColumn("zh_CN", cnVector);
predefineTableModel.addColumn("ja_JP", jpVector);
predefineTableModel.addColumn("zh_TW", twVector);
predefineTableModel.addColumn("ko_KR", krVector);
}
private void initCustomProperties() throws Exception {

31
designer_base/src/com/fr/design/actions/file/PreferencePane.java

@ -1,24 +1,5 @@
package com.fr.design.actions.file;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.util.Locale;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicDialog;
@ -39,9 +20,16 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.FRLevel;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.util.Locale;
/**
* 选项对话框
*
@ -87,7 +75,9 @@ public class PreferencePane extends BasicPane {
getLocaledLanguage("Simplified_Chinese_Language", Locale.SIMPLIFIED_CHINESE),
getLocaledLanguage("English_Language", Locale.ENGLISH),
getLocaledLanguage("Japanese_Language", Locale.JAPAN),
getLocaledLanguage("Traditional_Chinese_Language", Locale.TRADITIONAL_CHINESE)};
getLocaledLanguage("Traditional_Chinese_Language", Locale.TRADITIONAL_CHINESE),
getLocaledLanguage("Korea_Language",Locale.KOREA),
};
//设置是否支持undo
private UICheckBox supportUndoCheckBox;
@ -366,6 +356,7 @@ public class PreferencePane extends BasicPane {
generalPane.add(languageAndDashBoard_pane);
languageAndDashBoard_pane.add(LanguagePane);
languageComboBox = new UIComboBox(LANGUAGE);
languageComboBox.setFont(FRFont.getInstance("Dialog", Font.PLAIN, 12));//为了在中文系统中显示韩文
ActionLabel languageLabel = new ActionLabel(Inter.getLocText("FR-Designer_Designer_Language"));
languageLabel.addActionListener(new ActionListener() {
@Override

Loading…
Cancel
Save