Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 2.69 KB

Localization.md

File metadata and controls

60 lines (46 loc) · 2.69 KB

Localization

By default, the React Native library uses a device's locale. To enable necessary translations for iOS, make sure “Localizations” in the project configuration contains all required languages. If the device's locale is not supported, localization fallback to en-US.

Titles of payment methods are fetched from the Adyen API and localized according to the shopperLocale value you set in your /paymentMethods or /sessions requests.

Enforcing specific localization

Provide a specific locale to configuration.locale for AdyenCheckout.

Important

For Session flow locale will match value provided by your backend via shopperLocale parameter.

Overriding default values

iOS

  1. Open your iOS folder in Xcode.
  2. Create a new ’Strings’ file with the name Localizable. If you are using multiple localizations, make sure you check them all in for the Localizations.string in "File Inspector". For each localization, your iOS project will have a corresponding file: (localization).lproj/Localizable.string.
  3. Override all necessary strings with desired values for all your localizations. The list of available strings can be found here.

Android

  1. Open /res/values/strings.xml in "Translations Editor” in Android Studio.
  2. Override all necessary strings with desired values for all your localizations. The list of available strings can be found here

Adding new localizations

Add new locales in Xcode and Android Studio respectively. Provide a translation for all necessary keys.

List of currently avaialble locales:

Language Locale code Fallback
Arabic - International ar
Chinese - Simplified zh-CN
Chinese - Traditional zh-TW
Croatian hr-HR
Czech cs-CZ
Danish da-DK
Dutch nl-NL
English - US en-US
Finnish fi-FI
French fr-FR
German de-DE
Greek el-GR
Hungarian hu-HU
Italian it-IT
Japanese ja-JP
Korean ko-KR
Norwegian no-NO
Polish pl-PL
Portuguese - Brazil pt-BR
Portuguese - Portugal pt-PT
Romanian ro-RO
Russian ru-RU
Slovak sk-SK
Slovenian sl-SI
Spanish es-ES
Swedish sv-SE