diff --git a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
index 3a5c536..a8d1460 100644
--- a/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
+++ b/src/com/android/contacts/common/preference/DisplayOptionsPreferenceFragment.java
@@ -20,6 +20,7 @@
 import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.res.Resources;
 import android.os.Bundle;
 import android.preference.ListPreference;
 import android.preference.Preference;
@@ -45,19 +46,7 @@
         // Load the preferences from an XML resource
         addPreferencesFromResource(R.xml.preference_display_options);
 
-        // Remove "Default account" setting if no writable accounts.
-        final AccountTypeManager accountTypeManager = AccountTypeManager.getInstance(getContext());
-        final List<AccountWithDataSet> accounts = accountTypeManager.getAccounts(
-                /* contactWritableOnly */ true);
-        if (accounts.isEmpty()) {
-            final PreferenceScreen preferenceScreen = getPreferenceScreen();
-            preferenceScreen.removePreference((ListPreference) findPreference("accounts"));
-        }
-
-        // STOPSHIP Show this option when 1) metadata sync is enabled and 2) at least one
-        // focus google account.
-        final PreferenceScreen preferenceScreen = getPreferenceScreen();
-        preferenceScreen.removePreference((ListPreference) findPreference("contactMetadata"));
+        removeUnsupportedPreferences();
 
         // Set build version of Contacts App.
         final PackageManager manager = getActivity().getPackageManager();
@@ -75,6 +64,31 @@
         licensePreference.setIntent(new Intent(getActivity(), LicenseActivity.class));
     }
 
+    private void removeUnsupportedPreferences() {
+        // Disable sort order for CJK locales where it is not supported
+        final Resources resources = getResources();
+        if (!resources.getBoolean(R.bool.config_sort_order_user_changeable)) {
+            getPreferenceScreen().removePreference(findPreference("sortOrder"));
+        }
+
+        // Disable display order for CJK locales as well
+        if (!resources.getBoolean(R.bool.config_display_order_user_changeable)) {
+            getPreferenceScreen().removePreference(findPreference("displayOrder"));
+        }
+
+        // Remove the "Default account" setting if there aren't any writable accounts
+        final AccountTypeManager accountTypeManager = AccountTypeManager.getInstance(getContext());
+        final List<AccountWithDataSet> accounts = accountTypeManager.getAccounts(
+                /* contactWritableOnly */ true);
+        if (accounts.isEmpty()) {
+            getPreferenceScreen().removePreference(findPreference("accounts"));
+        }
+
+        // STOPSHIP Show this option when 1) metadata sync is enabled
+        // and 2) there is at least one focus google account
+        getPreferenceScreen().removePreference(findPreference("contactMetadata"));
+    }
+
     @Override
     public Context getContext() {
         return getActivity();
