Merge "Import translations. DO NOT MERGE"
diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
index 4994e59..673b545 100644
--- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
@@ -20,12 +20,13 @@
 
 import com.android.inputmethod.keyboard.ProximityInfo;
 
+import java.util.Locale;
+
 public class SynchronouslyLoadedContactsBinaryDictionary extends ContactsBinaryDictionary {
     private boolean mClosed;
 
-    public SynchronouslyLoadedContactsBinaryDictionary(final Context context) {
-        // TODO: add locale information.
-        super(context, Suggest.DIC_CONTACTS, null);
+    public SynchronouslyLoadedContactsBinaryDictionary(final Context context, final Locale locale) {
+        super(context, Suggest.DIC_CONTACTS, locale);
     }
 
     @Override
@@ -51,4 +52,4 @@
         mClosed = true;
         super.close();
     }
-}
\ No newline at end of file
+}
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index ede788d..8128779 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -154,7 +154,13 @@
 
     private void startUsingContactsDictionaryLocked() {
         if (null == mContactsDictionary) {
-            mContactsDictionary = new SynchronouslyLoadedContactsDictionary(this);
+            if (LatinIME.USE_BINARY_CONTACTS_DICTIONARY) {
+                // TODO: use the right locale for each session
+                mContactsDictionary =
+                        new SynchronouslyLoadedContactsBinaryDictionary(this, Locale.getDefault());
+            } else {
+                mContactsDictionary = new SynchronouslyLoadedContactsDictionary(this);
+            }
         }
         final Iterator<WeakReference<DictionaryCollection>> iterator =
                 mDictionaryCollectionsList.iterator();
@@ -432,7 +438,11 @@
                     // TODO: revert to the concrete type when USE_BINARY_CONTACTS_DICTIONARY is no
                     // longer needed
                     if (LatinIME.USE_BINARY_CONTACTS_DICTIONARY) {
-                        mContactsDictionary = new SynchronouslyLoadedContactsBinaryDictionary(this);
+                        // TODO: use the right locale. We can't do it right now because the
+                        // spell checker is reusing the contacts dictionary across sessions
+                        // without regard for their locale, so we need to fix that first.
+                        mContactsDictionary = new SynchronouslyLoadedContactsBinaryDictionary(this,
+                                Locale.getDefault());
                     } else {
                         mContactsDictionary = new SynchronouslyLoadedContactsDictionary(this);
                     }