Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/ClipboardTableImportMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/ClipboardTableImportMacro.groovy	(revision 0)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/prototypes/ClipboardTableImportMacro.groovy	(revision 1853)
@@ -0,0 +1,56 @@
+package org.txm.macro.imports
+
+import org.kohsuke.args4j.*
+import groovy.transform.Field
+import org.txm.rcp.swt.widget.parameters.*
+import org.txm.rcp.commands.*
+import org.txm.objects.*
+import org.txm.utils.io.*
+
+@Field @Option(name="corpus_name", usage="Corpus name", widget="String", required=true, def="CLIPBOARD")
+String corpus_name
+
+if (!ParametersDialog.open(this)) return;
+
+monitor.syncExec(new Runnable() {
+	public void run() {
+		try {
+String result = "<text id=\"$corpus_name\">\n"+org.txm.rcp.utils.IOClipboard.read()+"</text>";
+if (result == null || result.length() == 0) {
+	System.out.println("No copied text. Aborting.");
+	return;
+}
+
+def w = Toolbox.workspace
+def p = w.getProject(corpus_name)
+
+if (p != null) {
+	println "** Corpus $corpus_name already exists. Aborting"
+	return;
+}
+
+File tmp = new File(System.getProperty("java.io.tmpdir"), corpus_name)
+tmp.mkdirs()
+
+File tmp_text_file = new File(tmp, corpus_name+".cqp")
+println "tmp_text_file=$tmp_text_file"
+IOUtils.setText(tmp_text_file, result, "UTF-8")
+
+p = new Project(w, corpus_name, true)
+p.setLang("fr")
+p.setEncoding("UTF-8")
+p.setSourceDirectory(tmp.getAbsolutePath())
+p.setAnnotate(true)
+p.setCleanAfterBuild(true)
+p.setDoMultiThread(true)
+p.setImportModuleName("cqp")
+
+
+			p.compute()
+			
+			RestartTXM.reloadViews();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+});
\ No newline at end of file
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 1852)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/LangSection.java	(revision 1853)
@@ -79,7 +79,7 @@
 			}
 		});
 
-		String locale = Locale.getDefault().getCountry();
+		String locale = Locale.getDefault().getLanguage().toLowerCase();
 		int langToSelectIndex = -1;
 		int added = 0;
 		String modelsDir = TreeTaggerPreferences.getInstance().getString(TreeTaggerPreferences.MODELS_PATH);
@@ -117,7 +117,7 @@
 		boolean annotate = project.getAnnotate(); //$NON-NLS-1$
 
 		//fill combo and select default language
-		String defaultLang = Locale.getDefault().getLanguage();
+		String defaultLang = Locale.getDefault().getLanguage().toLowerCase();
 		if ("??".equals(lang)) { //$NON-NLS-1$
 			btnSelectLang.setSelection(false);
 			btnGuessLang.setSelection(true);
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 1852)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java	(revision 1853)
@@ -944,7 +944,12 @@
 			}
 		}
 
-		
+		Display.getDefault().syncExec(new Runnable() {
+			@Override
+			public void run() {
+				RestartTXM.reloadViews();
+			}
+		});
 	}
 
 	/**
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 1852)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/ImportWizard.java	(revision 1853)
@@ -65,7 +65,7 @@
 					}
 					project.setSourceDirectory(path.getAbsolutePath());
 					project.setDescription(System.getProperty("user.name")+"\n"+TXMResult.PRETTY_LOCALIZED_TIME_FORMAT.format(Calendar.getInstance().getTime()));
-					project.setLang(Locale.getDefault().getCountry());
+					project.setLang(Locale.getDefault().getLanguage().toLowerCase());
 					System.out.println(NLS.bind(TXMUIMessages.theP0CorpusWillBeCreatedFromTheP1Directory, project.getName(), project.getSrcdir()));
 				} else {
 					Date date = project.getLastComputingDate();
Index: tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 1852)
+++ tmp/org.txm.core/src/java/org/txm/core/preferences/TBXPreferences.java	(revision 1853)
@@ -152,7 +152,7 @@
 		preferences.put(TBXPreferences.IMPORT_DEFAULT_LANG, Locale.getDefault().getLanguage().toLowerCase());
 		preferences.put(TBXPreferences.UI_LOCALE, "fr"); //$NON-NLS-1$
 		
-		preferences.put(TBXPreferences.LANG, Locale.getDefault().getCountry().toLowerCase()); //$NON-NLS-1$
+		preferences.put(TBXPreferences.LANG, Locale.getDefault().getLanguage().toLowerCase()); //$NON-NLS-1$
 		preferences.put(TBXPreferences.ENCODING, DEFAULT_ENCODING);
 		preferences.put(TBXPreferences.DEFAULT_EDITION, "default"); //$NON-NLS-1$
 		preferences.putBoolean(TBXPreferences.ANNOTATE, false);
Index: tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java
===================================================================
--- tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 1852)
+++ tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationArea.java	(revision 1853)
@@ -31,7 +31,7 @@
 	 * @return
 	 */
 	public String getLocale() {
-		return Locale.getDefault().getCountry();
+		return Locale.getDefault().getLanguage();
 	}
 	
 	/**
