diff --git a/java/src/com/android/inputmethod/latin/settings/Settings.java b/java/src/com/android/inputmethod/latin/settings/Settings.java
index 84ba722..add983b 100644
--- a/java/src/com/android/inputmethod/latin/settings/Settings.java
+++ b/java/src/com/android/inputmethod/latin/settings/Settings.java
@@ -157,7 +157,7 @@
             final RunInLocale<SettingsValues> job = new RunInLocale<SettingsValues>() {
                 @Override
                 protected SettingsValues job(final Resources res) {
-                    return new SettingsValues(context, prefs, locale, res, inputAttributes);
+                    return new SettingsValues(context, prefs, res, inputAttributes);
                 }
             };
             mSettingsValues = job.runInLocale(mRes, locale);
diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
index 3fa686b..6ecee81 100644
--- a/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/settings/SettingsValues.java
@@ -96,9 +96,9 @@
     // Debug settings
     public final boolean mIsInternal;
 
-    public SettingsValues(final Context context, final SharedPreferences prefs, final Locale locale,
-            final Resources res, final InputAttributes inputAttributes) {
-        mLocale = locale;
+    public SettingsValues(final Context context, final SharedPreferences prefs, final Resources res,
+            final InputAttributes inputAttributes) {
+        mLocale = res.getConfiguration().locale;
         // Get the resources
         mDelayUpdateOldSuggestions = res.getInteger(R.integer.config_delay_update_old_suggestions);
         mSpacingAndPunctuations = new SpacingAndPunctuations(res);
@@ -166,12 +166,13 @@
         }
     }
 
+    // TODO: Remove this constructor.
     // Only for tests
     private SettingsValues(final Locale locale) {
         // TODO: locale is saved, but not used yet. May have to change this if tests require.
         mLocale = locale;
         mDelayUpdateOldSuggestions = 0;
-        mSpacingAndPunctuations = SpacingAndPunctuations.DEFAULT;
+        mSpacingAndPunctuations = new SpacingAndPunctuations(locale);
         mHintToSaveText = "Touch again to save";
         mInputAttributes = new InputAttributes(null, false /* isFullscreenMode */);
         mAutoCap = true;
@@ -206,6 +207,7 @@
         mAppWorkarounds.set(null);
     }
 
+    // TODO: Remove this method.
     @UsedForTesting
     public static SettingsValues makeDummySettingsValuesForTest(final Locale locale) {
         return new SettingsValues(locale);
diff --git a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java
index 0500f4a..124c975 100644
--- a/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java
+++ b/java/src/com/android/inputmethod/latin/settings/SpacingAndPunctuations.java
@@ -18,6 +18,7 @@
 
 import android.content.res.Resources;
 
+import com.android.inputmethod.annotations.UsedForTesting;
 import com.android.inputmethod.keyboard.internal.KeySpecParser;
 import com.android.inputmethod.latin.Constants;
 import com.android.inputmethod.latin.Dictionary;
@@ -29,6 +30,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Locale;
 
 public final class SpacingAndPunctuations {
     private final int[] mSymbolsPrecededBySpace;
@@ -39,10 +41,11 @@
     private final int mSentenceSeparator;
     public final String mSentenceSeparatorAndSpace;
     public final boolean mCurrentLanguageHasSpaces;
+    public final boolean mUsesAmericanTypography;
 
-    public static final SpacingAndPunctuations DEFAULT = new SpacingAndPunctuations();
-
-    private SpacingAndPunctuations() {
+    // TODO: Remove this constructor.
+    @UsedForTesting
+    SpacingAndPunctuations(final Locale locale) {
         mSymbolsPrecededBySpace = new int[] { '(', '[', '{', '&' };
         Arrays.sort(mSymbolsPrecededBySpace);
         mSymbolsFollowedBySpace = new int[] { '.', ',', ';', ':', '!', '?', ')', ']', '}', '&' };
@@ -55,6 +58,7 @@
         mSuggestPuncList = createSuggestPuncList(suggestPuncsSpec);
         mWordSeparators = "&\t \n()[]{}*&<>+=|.,;:!?/_\"";
         mCurrentLanguageHasSpaces = true;
+        mUsesAmericanTypography = Locale.ENGLISH.getLanguage().equals(locale.getLanguage());
     }
 
     public SpacingAndPunctuations(final Resources res) {
@@ -75,6 +79,10 @@
         mSentenceSeparatorAndSpace = new String(new int[] {
                 mSentenceSeparator, Constants.CODE_SPACE }, 0, 2);
         mCurrentLanguageHasSpaces = res.getBoolean(R.bool.current_language_has_spaces);
+        final Locale locale = res.getConfiguration().locale;
+        // Heuristic: we use American Typography rules because it's the most common rules for all
+        // English variants.
+        mUsesAmericanTypography = Locale.ENGLISH.getLanguage().equals(locale.getLanguage());
     }
 
     // Helper functions to create member values.
diff --git a/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java b/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java
index 6ad5c77..c741672 100644
--- a/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/CapsModeUtils.java
@@ -167,8 +167,7 @@
         // No other language has such a rule as far as I know, instead putting inside the quotation
         // mark as the exact thing quoted and handling the surrounding punctuation independently,
         // e.g. <<Did he say, "let's go home"?>>
-        // Hence, specifically for English, we treat this special case here.
-        if (Locale.ENGLISH.getLanguage().equals(settingsValues.mLocale.getLanguage())) {
+        if (settingsValues.mSpacingAndPunctuations.mUsesAmericanTypography) {
             for (; j > 0; j--) {
                 // Here we look to go over any closing punctuation. This is because in dominant
                 // variants of English, the final period is placed within double quotes and maybe
