
SDK Internationalization
iOS
Android
Ready-to-use UI currently supports the following languages:
- English (enen_US)
- Arabic (arar_AR)
- Catalan (caca_ES)
- Chinese Simplified (zh-Hanszh_CN)
- Dutch (nlnl_NL)
- French (frfr_FR)
- French Canada (fr-CAfr_CA)
- German (dede_DE)
- Italian (itit_IT)
- Japanese (jaja_JA)
- Portuguese (ptpt_PT)
- Russian (ruru_RU)
- Spanish (eses_ES)
- Thai (thth_TH)
Set the Checkout language
By default checkout will use the user's preferred language, if available. Otherwise English will be used.
You can also set checkout language within OPPCheckoutSettings
configuration (use the two-letter ISO 639-1 standard). Do not set this property to use default language.
OPPCheckoutSettings *settings = [[OPPCheckoutSettings alloc] init];
settings.language = @"de";
let settings = OPPCheckoutSettings()
settings.language = "de"
Set up the locale in the CheckoutSettings
and start the CheckoutActivity
. For example:
CheckoutSettings checkoutSettings = new CheckoutSettings(checkoutId, paymentBrands);
checkoutSettings.setLocale("de_DE");
Intent intent = new Intent(YOURACTIVITY.this, CheckoutActivity.class);
intent.putExtra(CheckoutActivity.CHECKOUT_SETTINGS, checkoutSettings);
startActivityForResult(intent, CheckoutActivity.CHECKOUT_ACTIVITY);
Change the translation for supported languages
You can find all localizable strings and translations in OPPWAMobile.Checkout-Resources.bundle
.
Localizable strings are located in language-specific folders with the .lproj extension.
Open the folder with the chosen language and change the values in the OPPCheckout.strings
file.
You can simply override string resources by adding the string with the same key to your app res/values/strings.xml
file.
You will find full list of localizable strings at the end of this guide.
<string name="checkout_transaction_run">Please wait</string>
<string name="checkout_payment_details">Payment Details</string>
<string name="checkout_processing">Processing</string>
....
Add a new language
Add a new folder with the .lproj extension to the OPPWAMobile.Checkout-Resources.bundle
. The name should be a valid language code. Then copy the .strings file from English localization to the created folder and change the translations.
NOTE: Make sure you add the language to the project.
Add a new language for checkout by creating a new folder for translation values with appropriate locale in /res/
folder. For example see the French language folder: /res/values-fr/
.
Add default strings.xml
there. It can be found in the default folder: /res/values/
Localization of payment method labels
You can localize label for any payment method you need. Just add a translation with an appropriate key which is concatenation of prefix PAYMENT_METHOD_TYPE_
and brand constant, e.g. MASTER
.
"PAYMENT_METHOD_TYPE_MASTER" = "MasterCard";
"PAYMENT_METHOD_TYPE_AMEX" = "American Express";
You can localize label for any payment method you need. Just add a translation with an appropriate key which is brand constant in lowercase, e.g. master
.
<string name="master">MasterCard</string>
<string name="amex">American Express</string>
Localizable strings
<!-- content -->
<string name="checkout_transaction_run">Please wait</string>
<string name="checkout_payment_details">Payment Details</string>
<string name="checkout_processing">Processing</string>
<string name="checkout_layout_text_payment_info">Payment Info</string>
<string name="checkout_layout_text_total_amount">Total Amount</string>
<string name="checkout_layout_text_select_payment_method">Payment Methods</string>
<string name="checkout_layout_text_stored_payment_methods">Stored Payment Methods</string>
<string name="checkout_layout_text_cards_payment_methods">Credit / Debit Cards</string>
<string name="checkout_layout_text_other_payment_methods">Other Payment Methods</string>
<string name="checkout_layout_text_select_country">Select Country</string>
<string name="checkout_layout_text_select_bank">Select Bank</string>
<string name="checkout_choose_card_type">Choose card type</string>
<string name="checkout_layout_text_pay">PAY NOW</string>
<string name="checkout_layout_text_pay_amount">PAY %s</string>
<string name="checkout_layout_text_register">REGISTER</string>
<string name="checkout_layout_text_header_amount" formatted="false">%.2f %s</string>
<string name="checkout_tokenization_checkbox">Store payment details for future use</string>
<string name="checkout_number_of_installments">Number of installments</string>
<string name="checkout_layout_text_push_notification_sent">A push notification will be sent to your device.</string>
<string name="checkout_layout_text_accept_mbway_pin">Please accept the transaction with your PIN MB WAY.</string>
<string name="checkout_layout_text_terms_and_conditions">Terms and Conditions</string>
<string name="checkout_layout_text_terms_and_conditions_agreement">I have read and agree the Terms and Conditions</string>
<string name="checkout_layout_text_swedish">Swedish</string>
<string name="checkout_layout_text_finnish">Finnish</string>
<!-- hints -->
<string name="checkout_layout_hint_card_holder">Name of Card Holder</string>
<string name="checkout_layout_hint_card_number">Credit Card Number</string>
<string name="checkout_layout_hint_card_expiration_date">Expiration Date</string>
<string name="checkout_layout_hint_card_cvv">Security Code or CVV</string>
<string name="checkout_layout_hint_phone_number">Mobile Phone Number</string>
<string name="checkout_layout_hint_direct_debit_sepa_account_holder">Account Holder</string>
<string name="checkout_layout_hint_direct_debit_sepa_iban">IBAN</string>
<string name="checkout_layout_hint_email">Email</string>
<string name="checkout_layout_hint_country_code">Country Code</string>
<string name="checkout_layout_hint_national_identifier">National Identifier</string>
<!-- helpers -->
<string name="checkout_helper_card_holder">Name as it appears on card</string>
<string name="checkout_helper_card_number">Long number on the front of your card</string>
<string name="checkout_helper_expiration_date">Use MM/YY or MM/YYYY format</string>
<string name="checkout_helper_security_code">Last 3 digits on the back of your card</string>
<string name="checkout_helper_security_code_amex">4-digit code on front of your card</string>
<string name="checkout_helper_country_code">+xxx</string>
<string name="checkout_helper_phone_number">xxxxxxxxx</string>
<string name="checkout_helper_iban">The IBAN (International Bank Account Number) associated with the bank account</string>
<string name="checkout_helper_iban_account_number">IBAN or Account Number</string>
<string name="checkout_helper_bic_bank_code">BIC or Bank Code</string>
<string name="checkout_helper_national_identifier">National Identifier</string>
<!-- errors -->
<string name="checkout_error_card_holder_invalid">Card holder name is not valid</string>
<string name="checkout_error_card_number_invalid">Card number entered is not valid</string>
<string name="checkout_error_expiration_date_invalid">Card expiration date is not valid, use MM/YY or MM/YYYY format</string>
<string name="checkout_error_expiration_date">Card is expired</string>
<string name="checkout_error_security_code_invalid">Security code must contain last 3 digits on the back of your card</string>
<string name="checkout_error_security_code_invalid_amex">Security code must contain 4-digit number on the front of your card</string>
<string name="checkout_error_mobile_phone_number_invalid">Invalid mobile number</string>
<string name="checkout_error_account_holder_invalid">Account holder name is not valid</string>
<string name="checkout_error_iban_invalid">IBAN is not valid</string>
<string name="checkout_error_iban_account_number_invalid">IBAN or Account Number is not valid</string>
<string name="checkout_error_bic_bank_code_invalid">BIC or Bank Code is not valid</string>
<string name="checkout_error_email_invalid">Invalid email</string>
<string name="checkout_error_national_identifier_invalid">Invalid national identifier</string>
<!-- device auth -->
<string name="checkout_auth_confirm_payment">To confirm payment</string>
<string name="checkout_fingerprint_touch_sensor">Touch sensor</string>
<string name="checkout_fingerprint_success">Fingerprint recognized</string>
<string name="checkout_fingerprint_not_recognized">Fingerprint not recognized, try again</string>
<string name="checkout_fingerprint_enter_pin">Enter PIN</string>
<string name="checkout_fingerprint_cancel">Cancel</string>