Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 5703)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 5704)
@@ -42,11 +42,16 @@
 import javax.swing.AbstractAction;
 import javax.swing.Action;
+import javax.swing.BorderFactory;
 import javax.swing.Box;
 import javax.swing.DefaultListCellRenderer;
 import javax.swing.ImageIcon;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JList;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
 import javax.swing.KeyStroke;
 import javax.swing.table.DefaultTableModel;
@@ -62,4 +67,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.data.preferences.BooleanProperty;
+import org.openstreetmap.josm.data.preferences.IntegerProperty;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
@@ -68,7 +75,9 @@
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager;
 import org.openstreetmap.josm.gui.util.GuiHelper;
+import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
 import org.openstreetmap.josm.io.XmlWriter;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WindowGeometry;
 
@@ -96,5 +105,5 @@
 
     public static final int DEFAULT_LRU_TAGS_NUMBER = 5;
-    public static final int MAX_LRU_TAGS_NUMBER = 9;
+    public static final int MAX_LRU_TAGS_NUMBER = 30;
 
     // LRU cache for recently added tags (http://java-planet.blogspot.com/2005/08/how-to-set-up-simple-lru-cache-using.html) 
@@ -250,4 +259,5 @@
             keys.setSelectedItem(key);
 
+            p.add(Box.createVerticalStrut(5),GBC.eol()); 
             p.add(new JLabel(tr("Key")), GBC.std());
             p.add(Box.createHorizontalStrut(10), GBC.std());
@@ -266,4 +276,5 @@
             values.setSelectedItem(selection);
             values.getEditor().setItem(selection);
+            p.add(Box.createVerticalStrut(5),GBC.eol()); 
             p.add(new JLabel(tr("Value")), GBC.std());
             p.add(Box.createHorizontalStrut(10), GBC.std());
@@ -364,10 +375,15 @@
     }
 
+    public static final BooleanProperty PROPERTY_FIX_TAG_LOCALE = new BooleanProperty("properties.fix-tag-combobox-locale", false);
+    public static final IntegerProperty PROPERTY_RECENT_TAGS_NUMBER = new IntegerProperty("properties.recently-added-tags", DEFAULT_LRU_TAGS_NUMBER);
+
     abstract class AbstractTagsDialog extends ExtendedDialog {
         AutoCompletingComboBox keys;
         AutoCompletingComboBox values;
+        Component componentUnderMouse;
         
         public AbstractTagsDialog(Component parent, String title, String[] buttonTexts) {
             super(parent, title, buttonTexts);
+            addMouseListener(new PopupMenuLauncher(popupMenu));
         }
 
@@ -392,4 +408,5 @@
                     rememberWindowGeometry(geometry);
                 }
+                keys.setFixedLocale(PROPERTY_FIX_TAG_LOCALE.get());
             }
             super.setVisible(visible);
@@ -445,6 +462,40 @@
            editor.addFocusListener(focus);
            return focus;
-       }
-        
+        }
+        
+        protected JPopupMenu popupMenu = new JPopupMenu() {
+            JCheckBoxMenuItem fixTagLanguageCb = new JCheckBoxMenuItem(
+                new AbstractAction(tr("Use English language for tag by default")){
+                public void actionPerformed(ActionEvent e) {
+                    boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
+                    PROPERTY_FIX_TAG_LOCALE.put(sel);
+                }
+            });
+            JMenuItem pasteK = new JMenuItem(
+                new AbstractAction(tr("Paste tag")){
+                public void actionPerformed(ActionEvent e) {
+                    String buf = Utils.getClipboardContent().trim();
+                    if (buf.isEmpty()) return;
+                    keys.setSelectedItem(buf);
+                }
+            });
+            JMenuItem pasteV = new JMenuItem(
+                new AbstractAction(tr("Paste value")){
+                public void actionPerformed(ActionEvent e) {
+                    String buf = Utils.getClipboardContent().trim();
+                    if (buf.isEmpty()) return;
+                    values.setSelectedItem(buf);
+                }
+            });
+            
+            {
+                add(pasteK);
+                add(pasteV);
+                addSeparator();
+                add(fixTagLanguageCb);
+                fixTagLanguageCb.setState(PROPERTY_FIX_TAG_LOCALE.get());
+            }
+        };
+                
     }
 
@@ -511,5 +562,5 @@
             focus.focusGained(null);
 
-            int recentTagsToShow = Main.pref.getInteger("properties.recently-added-tags", DEFAULT_LRU_TAGS_NUMBER);
+            int recentTagsToShow = PROPERTY_RECENT_TAGS_NUMBER.get();
             if (recentTagsToShow > MAX_LRU_TAGS_NUMBER) {
                 recentTagsToShow = MAX_LRU_TAGS_NUMBER;
@@ -532,6 +583,25 @@
             
             selectKeysComboBox();
-        }
-
+            
+            popupMenu.add(new AbstractAction(tr("Set number of recently added tags")) {
+                public void actionPerformed(ActionEvent e) {
+                    selectNumberOfTags();
+                }
+            });
+        }
+        
+        private void selectNumberOfTags() {
+            String s = JOptionPane.showInputDialog(this, tr("Please enter the number of recently added tags to display"));
+            if (s!=null) try {
+                int v = Integer.parseInt(s);
+                if (v>=0 && v<=MAX_LRU_TAGS_NUMBER) {
+                    PROPERTY_RECENT_TAGS_NUMBER.put(v);
+                    return;
+                }
+            } catch (NumberFormatException ex) { }
+            JOptionPane.showMessageDialog(this, tr("Please enter integer number between 0 and {0}", MAX_LRU_TAGS_NUMBER));
+            
+        }
+        
         private void suggestRecentlyAddedTags(JPanel mainPanel, int tagsToShow, final FocusAdapter focus) {
             if (!(tagsToShow > 0 && !recentTags.isEmpty())) 
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 5703)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletingComboBox.java	(revision 5704)
@@ -8,5 +8,7 @@
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
+import java.awt.im.InputContext;
 import java.util.Collection;
+import java.util.Locale;
 
 import javax.swing.ComboBoxEditor;
@@ -33,4 +35,5 @@
 
     private int maxTextLength = -1;
+    private boolean useFixedLocale;
 
     /**
@@ -272,4 +275,25 @@
 
     /**
+     * If the locale is fixed, English keyboard layout will be used by default for this combobox
+     * all other components can still have different keyboard layout selected
+     */
+    public void setFixedLocale(boolean f) {
+        useFixedLocale = f;
+        if (useFixedLocale) {
+            privateInputContext.selectInputMethod(new Locale("en", "US"));
+        }
+    }
+
+    private static InputContext privateInputContext = InputContext.getInstance();
+    
+    @Override
+    public InputContext getInputContext() {
+        if (useFixedLocale) {
+            return privateInputContext;
+        }
+        return super.getInputContext();
+    }
+
+    /**
      * ListCellRenderer for AutoCompletingComboBox
      * renders an AutoCompletionListItem by showing only the string value part
