SCPHardcodedLocaleConfig

Objective-C


@interface SCPHardcodedLocaleConfig : SCPLocaleConfig

Swift

class HardcodedLocaleConfig : LocaleConfig

Localizes API error messages to a fixed locale tag.

The locale tag must conform to the format language[-script][-region] where:

  • language is a 2-3 letter ISO 639 code (e.g., “en”, “fil”)
  • script (optional) is only “Hans” or “Hant”
  • region (optional) is a 2-letter ISO 3166-1 alpha-2 code (e.g., “US”) or a 3-digit UN M.49 code (e.g., “419”)

If the locale is not supported by Stripe’s localization infrastructure, error messages will fall back to English (en-US).

  • The locale sent in the Accept-Language header.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull locale;

    Swift

    var locale: String { get }
  • Unavailable

    Unavailable. Use SCPHardcodedLocaleConfigBuilder to create a hardcoded locale config.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Unavailable. Use SCPHardcodedLocaleConfigBuilder to create a hardcoded locale config.

    Declaration

    Objective-C

    + (nonnull instancetype)new;