LocalizationAPI
The APIs for localizing your extension.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
Utilities for translating content and formatting values according to the current localization
of the checkout.
Refer to localization
examples for more information.
The details about the location, language, and currency of the customer. For utilities to easily format and translate content based on these details, you can use the i18n
object instead.
Anchor to useCurrencyuse Currency()
Returns the currency of the checkout.
Currency
The ISO-4217 code for this currency.
Anchor to useExtensionLanguageuse Extension Language()
Returns the buyer's language, as supported by the extension.
Language
The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code.
Anchor to useLanguageuse Language()
Returns the current language of the checkout, and automatically re-renders your component if the language changes.
Language
The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code.
Anchor to useLocalizationCountryuse Localization Country()
Returns the country of the checkout, and automatically re-renders your component if the country changes.
Anchor to useLocalizationMarketuse Localization Market()
Returns the market of the checkout, and automatically re-renders your component if it changes.
Anchor to useTimezoneuse Timezone()
Returns the time zone of the checkout, and automatically re-renders your component if the time zone changes.
Anchor to useTranslateuse Translate()
Returns the interface used to translate strings.
I18nTranslate
Translating strings
Anchor to examplesExamples
Anchor to example-translating-strings-with-pluralizationTranslating strings with pluralization
You can use the count
option to get a pluralized string based on the current locale.
See localizing UI extensions for more information.