HardcodedLocale

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).

Types

Link copied to clipboard
class Builder(locale: String)

Builder for HardcodedLocale. The locale tag is validated by build.

Properties

Link copied to clipboard
val locale: String

The locale sent in the Accept-Language header.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String