/** * The localization API in checkout UI extensions includes select geolocation * data for the current user and read-only access to localization fields. */ export interface Localization { /** * The currency that the customer sees for money amounts in the checkout. */ currency: { /** * The [ISO-4217 alphabetic code](https://en.wikipedia.org/wiki/ISO_4217#Active_codes_(list_one)) for this currency. */ isoCode: string; }; /** * The [TZ identifer](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for buyer’s time zone. * @example 'Canada/Eastern' */ timezone: string; /** * The language the customer sees in the checkout. */ language: Language; /** * This is the customer's language, as supported by the extension. * If the customer's actual language is not supported by the extension, * then this is the language that is used for translations. * * For example, if the customer's language is 'fr-CA' but your extension * only supports translations for 'fr', then the `isoCode` for this * language is 'fr'. If your extension does not provide French * translations at all, then this value is the default locale for your * extension (that is, the one matching your .default.json file). */ extensionLanguage: Language; /** * The country context of the checkout. This value carries over from the * context of the cart, where it was used to contextualize the storefront * experience. It will update if the buyer changes the country of their * shipping address. If the country is unknown, then the shop's default country is used. */ country: { /** * The [ISO 3166 Alpha-2 format](https://www.iso.org/iso-3166-country-codes.html) for the buyer's country. */ isoCode: string; }; } interface Language { /** * The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code. * * @example 'en' for English, or 'en-US' for English local to United States. * @see https://en.wikipedia.org/wiki/IETF_language_tag * @see https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ isoCode: string; } export {};