diff --git a/CRM/Stripe/Api.php b/CRM/Stripe/Api.php index 5944f2f785e8df92d892bea282135abef7fe7e3d..5e79f5a87be7c84538015a65ee55ac66ffb4c685 100644 --- a/CRM/Stripe/Api.php +++ b/CRM/Stripe/Api.php @@ -239,6 +239,9 @@ class CRM_Stripe_Api { if (array_key_exists($civiCRMLocale, $localeMap)) { return $localeMap[$civiCRMLocale]; } - return 'auto'; + // Most stripe locale codes are two characters which match the first two chars + // of the CiviCRM locale. If it doesn't match the Stripe element will fallback + // to "auto" + return substr($civiCRMLocale,0, 2); } }