diff --git a/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java b/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java
index d8e3323..25fa723 100644
--- a/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/DictionaryInfoUtils.java
@@ -313,35 +313,12 @@
      * unique ID to them. This ID is just the name of the language (locale-wise) they
      * are for, and this method returns this ID.
      */
-    public static String getMainDictId(final Locale locale) {
+    public static String getMainDictId(@Nonnull final Locale locale) {
         // This works because we don't include by default different dictionaries for
         // different countries. This actually needs to return the id that we would
         // like to use for word lists included in resources, and the following is okay.
         return BinaryDictionaryGetter.MAIN_DICTIONARY_CATEGORY +
-                BinaryDictionaryGetter.ID_CATEGORY_SEPARATOR + locale.getLanguage().toString();
-    }
-
-    /**
-     * Returns whether a main dictionary is readily available for this locale.
-     *
-     * This does not query the content provider.
-     *
-     * @param context context to open files upon
-     * @param locale dictionary locale
-     * @return true if a dictionary is available right away, false otherwise
-     */
-    public static boolean hasReadilyAvailableMainDictionaryForLocale(final Context context,
-            final Locale locale) {
-        final Resources res = context.getResources();
-        if (0 != getMainDictionaryResourceIdIfAvailableForLocale(res, locale)) {
-            return true;
-        }
-        final String fileName = getCacheFileName(getMainDictId(locale), locale.toString(), context);
-        return new File(fileName).exists();
-    }
-
-    public static DictionaryHeader getDictionaryFileHeaderOrNull(final File file) {
-        return getDictionaryFileHeaderOrNull(file, 0, file.length());
+                BinaryDictionaryGetter.ID_CATEGORY_SEPARATOR + locale.toString().toLowerCase();
     }
 
     public static DictionaryHeader getDictionaryFileHeaderOrNull(final File file,
diff --git a/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
index 6e71607..812353c 100644
--- a/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/DictionaryInfoUtilsTests.java
@@ -20,6 +20,7 @@
 import android.test.AndroidTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
 
+import com.android.inputmethod.latin.common.LocaleUtils;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 
 import java.util.Locale;
@@ -44,4 +45,21 @@
                 sp));
         assertFalse(DictionaryInfoUtils.looksValidForDictionaryInsertion("!!!", sp));
     }
+
+    public void testGetMainDictId() {
+        assertEquals("main:en",
+                DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("en")));
+        assertEquals("main:en_us",
+                DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("en_US")));
+        assertEquals("main:en_gb",
+                DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("en_GB")));
+
+        assertEquals("main:es",
+                DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("es")));
+        assertEquals("main:es_us",
+                DictionaryInfoUtils.getMainDictId(LocaleUtils.constructLocaleFromString("es_US")));
+
+        assertEquals("main:en_us_posix", DictionaryInfoUtils.getMainDictId(
+                        LocaleUtils.constructLocaleFromString("en_US_POSIX")));
+    }
 }
