diff --git a/java/res/xml/spellchecker.xml b/java/res/xml/spellchecker.xml index 2e4448c44c1bfb1d0e94d974b544c598ea613ac9..66cd662802e7b6cf8c3fa813db3c96eab07f3eb9 100644 --- a/java/res/xml/spellchecker.xml +++ b/java/res/xml/spellchecker.xml @@ -27,6 +27,14 @@ android:label="@string/subtype_generic" android:subtypeLocale="en" /> + <subtype + android:label="@string/subtype_generic" + android:subtypeLocale="en_US" + /> + <subtype + android:label="@string/subtype_generic" + android:subtypeLocale="en_GB" + /> <subtype android:label="@string/subtype_generic" android:subtypeLocale="fr" @@ -55,4 +63,12 @@ android:label="@string/subtype_generic" android:subtypeLocale="nl" /> + <subtype + android:label="@string/subtype_generic" + android:subtypeLocale="hr" + /> + <subtype + android:label="@string/subtype_generic" + android:subtypeLocale="pt_BR" + /> </spell-checker> diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index afd59c3f8d9f70b21293712e0306743ecb7ebc4c..aa325018578eb65b2d8a2910a557b5421a91f7db 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java @@ -102,13 +102,19 @@ public class AndroidSpellCheckerService extends SpellCheckerService // will never have any suggestions, so it makes no sense checking them. mLanguageToScript = new TreeMap<String, Integer>(); mLanguageToScript.put("en", SCRIPT_LATIN); + mLanguageToScript.put("en_US", SCRIPT_LATIN); + mLanguageToScript.put("en_GB", SCRIPT_LATIN); mLanguageToScript.put("fr", SCRIPT_LATIN); mLanguageToScript.put("de", SCRIPT_LATIN); mLanguageToScript.put("nl", SCRIPT_LATIN); mLanguageToScript.put("cs", SCRIPT_LATIN); mLanguageToScript.put("es", SCRIPT_LATIN); mLanguageToScript.put("it", SCRIPT_LATIN); + mLanguageToScript.put("hr", SCRIPT_LATIN); + mLanguageToScript.put("pt_BR", SCRIPT_LATIN); mLanguageToScript.put("ru", SCRIPT_CYRILLIC); + // TODO: Make a persian proximity, and activate the Farsi subtype. + // mLanguageToScript.put("fa", SCRIPT_PERSIAN); } @Override public void onCreate() {