SDK Internationalization

Todo Java Script

Ready-to-use UI currently supports the following languages:

  • English ()
  • Arabic ()
  • Basque ()
  • Catalan ()
  • Chinese Simplified ()
  • Croatian ()
  • Czech ()
  • Danish ()
  • Dutch ()
  • Dutch Belgium ()
  • Finnish ()
  • French ()
  • French Belgium ()
  • French Canada ()
  • Galician ()
  • German ()
  • German Austria ()
  • Hungarian ()
  • Italian ()
  • Italian (Switzerland) ()
  • Japanese ()
  • Korean ()
  • Norwegian Bokmål ()
  • Polish ()
  • Portuguese ()
  • Romanian ()
  • Russian ()
  • Serbian ()
  • Slovak ()
  • Slovenian ()
  • Spanish ()
  • Swedish ()
  • Thai ()

Set the Checkout language

Change the translation for supported languages

If you still use an older version, you should change string files in the OPPWAMobile-Resources.bundle.
  1. Create OPPCheckout.strings file in your project:
    • In Xcode, select File > New > File….
    • Then select Strings File from the iOS Resource category and click Next.
    • Name the file OPPCheckout and click Create.

      2. Add new strings which should be changed into this file with the specific keys like in the sample below (base language):

"VIEW_CONTROLLER_TITLE_PAYMENT_METHOD_SELECTION" = "Select Payment Method";
"VIEW_CONTROLLER_TITLE_PAYMENT_DETAILS" = "Payment Details";
"VIEW_CONTROLLER_TITLE_PROCESSING" = "Processing";

See the full list of available keys at the end of this guide.

3. Customize strings for other languages: If you need to support multiple locations, select your OPPCheckout.strings file, and click Localize in the right pane. You will see Localization options with all project languages. When you select the missing language, a new variant of OPPCheckout.strings will be created for it. Add translations in the new created file. It’s not required to override all the labels, if you miss something, it will be fetched from the corresponding SDK strings files.

NOTE: If you don’t see required language in Localization options, make sure you added the language to the project.

Add a new language

Localization of payment method labels

"PAYMENT_METHOD_TYPE_MASTER" = "MasterCard";
"PAYMENT_METHOD_TYPE_AMEX" = "American Express";

Localizable strings

/// View controller titles
"VIEW_CONTROLLER_TITLE_PAYMENT_METHOD_SELECTION" = "Select Payment Method";
"VIEW_CONTROLLER_TITLE_PAYMENT_DETAILS" = "Payment Details";
"VIEW_CONTROLLER_TITLE_PROCESSING" = "Processing";

/// Form titles
"FORM_TITLE_PAYMENT_INFO" = "Payment Info";

/// Labels
"LABEL_TOTAL_AMOUNT" = "Total Amount";
"LABEL_MBWAY_PUSH_NOTIFICATION" = "A push notification will be sent to your device.";
"LABEL_MBWAY_ACCEPT_PIN" = "Please accept the transaction with your PIN MB WAY.";
"LABEL_TERMS_AND_CONDITIONS" = "Terms and Conditions";
"LABEL_TERMS_AND_CONDITIONS_AGREEMENT" = "I have read and agree the Terms and Conditions";
"LABEL_SWEDISH" = "Swedish";
"LABEL_FINNISH" = "Finnish";
"LABEL_STC_PAY_SELECT_PAYMENT_METHOD" = "Please select your preferred payment method:";

/// Messages
"MESSAGE_PLEASE_WAIT" = "Please wait";

/// Device owner authentication
"DEVICE_AUTH_REASON" = "To confirm payment";

/// Button titles
"BUTTON_TITLE_PAY" = "Pay now";
"BUTTON_TITLE_PAY_AMOUNT" = "Pay %@";
"BUTTON_TITLE_REGISTER" = "Register";
"BUTTON_TITLE_CANCEL" = "Cancel";
"BUTTON_TITLE_BACK" = "Change";
"BUTTON_TITLE_DONE" = "Done";

/// Text field label names
"FIELD_LABEL_CARD_HOLDER_NAME" = "Name of Card Holder";
"FIELD_LABEL_CREDIT_CARD_NUMBER" = "Credit Card Number";
"FIELD_LABEL_EXPIRY_DATE" = "Expiration Date";
"FIELD_LABEL_CVV" = "Security Code or CVV";
"FIELD_LABEL_MOBILE_PHONE_NUMBER" = "Mobile Phone Number";
"FIELD_LABEL_QRCODE" = "QR-Code";
"FIELD_LABEL_BANK_ACCOUNT_HOLDER_NAME" = "Account Holder";
"FIELD_LABEL_IBAN" = "IBAN";
"FIELD_LABEL_IBAN_OR_ACCOUNT_NUMBER" = "IBAN or Account Number";
"FIELD_LABEL_BIC_OR_BANK_CODE" = "BIC or Bank Code";
"FIELD_LABEL_SELECT_COUNTRY" = "Select Country:";
"FIELD_LABEL_SELECT_BANK" = "Select Bank:";
"FIELD_LABEL_STORE_PAYMENT_DETAILS" = "Store payment details for future use";
"FIELD_LABEL_STORE_CARD_TYPE" = "Choose card type:";
"FIELD_LABEL_NUMBER_OF_INSTALLMENTS" = "Number of installments";
"FIELD_LABEL_EMAIL" = "Email";
"FIELD_LABEL_COUNTRY_CODE" = "Country code";
"FIELD_LABEL_NATIONAL_IDENTIFIER" = "National Identifier";
"FIELD_LABEL_ACCOUNT_NUMBER" = "Account Number";
"FIELD_LABEL_ACCOUNT_VERIFICATION" = "Account Verification";

/// Text field placeholders
"FIELD_PLACEHOLDER_CARD_HOLDER_NAME" = "Name as it appears on card";
"FIELD_PLACEHOLDER_CARD_NUMBER" = "Long number on the front of your card";
"FIELD_PLACEHOLDER_EXPIRY_DATE" = "MM/YY or MM/YYYY";
"FIELD_PLACEHOLDER_CVV_3_DIGITS" = "3-digit code";
"FIELD_PLACEHOLDER_CVV_4_DIGITS" = "4-digit code";
"FIELD_PLACEHOLDER_BANK_ACCOUNT_HOLDER_NAME" = "Account Holder Name";
"FIELD_PLACEHOLDER_IBAN" = "International Bank Account Number";
"FIELD_PLACEHOLDER_IBAN_OR_ACCOUNT_NUMBER" = "IBAN or Account Number";
"FIELD_PLACEHOLDER_BIC_OR_BANK_CODE" = "BIC or Bank Code";
"FIELD_PLACEHOLDER_COUNTRY_CODE" = "+xxx";
"FIELD_PLACEHOLDER_MOBILE_PHONE_NUMBER" = "xxxxxxxxx";
"FIELD_PLACEHOLDER_EMAIL" = "Email";
"FIELD_PLACEHOLDER_NATIONAL_IDENTIFIER" = "National Identifier";
"FIELD_PLACEHOLDER_ACCOUNT_NUMBER" = "Account Number";
"FIELD_PLACEHOLDER_ACCOUNT_VERIFICATION" = "Account Verification";

/// Text field errors
"FIELD_ERROR_CARD_HOLDER_NAME_INVALID" = "Card holder name is not valid";
"FIELD_ERROR_CARD_NUMBER_INVALID" = "Card number entered is not valid";
"FIELD_ERROR_CARD_EXPIRY_DATE_INVALID" = "Card expiration date is not valid, use MM/YY or MM/YYYY format";
"FIELD_ERROR_CARD_EXPIRED" = "Card is expired";
"FIELD_ERROR_CARD_CVV_3_DIGITS_INVALID" = "Security code must contain last 3 digits on the back of your card";
"FIELD_ERROR_CARD_CVV_4_DIGITS_INVALID" = "Security code must contain 4-digit number on the front of your card";
"FIELD_ERROR_BANK_ACCOUNT_HOLDER_INVALID" = "Account holder name is not valid";
"FIELD_ERROR_IBAN_INVALID" = "IBAN is not valid";
"FIELD_ERROR_IBAN_OR_ACCOUNT_NUMBER_INVALID" = "IBAN or account number is not valid";
"FIELD_ERROR_BIC_OR_BANK_CODE_INVALID" = "BIC or bank code is not valid";
"FIELD_ERROR_EMAIL_INVALID" = "Invalid email";
"FIELD_ERROR_MOBILE_PHONE_INVALID" = "Invalid mobile number";
"FIELD_ERROR_NATIONAL_IDENTIFIER_INVALID" = "Invalid national identifier";
"FIELD_ERROR_ACCOUNT_NUMBER_INVALID" = "Invalid account number";
"FIELD_ERROR_ACCOUNT_EXPIRY_DATE_INVALID" = "Expiration date is not valid, use MM/YY or MM/YYYY format";
"FIELD_ERROR_ACCOUNT_EXPIRED" = "Account is expired";

/// Payment method groups are displayed if tokens are received
"PAYMENT_METHOD_GROUP_STORED" = "Stored Payment Methods";
"PAYMENT_METHOD_GROUP_OTHER" = "Other Payment Methods";
"PAYMENT_METHOD_GROUP_CARDS" = "Credit / Debit Cards";

Note: this section contains the tutorial for Android. A Button to switch between Android and iOS will be implemented at a later time

Ready-to-use UI currently supports the following languages:

  • English ()
  • Arabic ()
  • Basque ()
  • Catalan ()
  • Chinese Simplified ()
  • Croatian ()
  • Czech ()
  • Danish ()
  • Dutch ()
  • Dutch Belgium ()
  • Finnish ()
  • French ()
  • French Belgium ()
  • French Canada ()
  • Galician ()
  • German ()
  • German Austria ()
  • Hungarian ()
  • Italian ()
  • Italian (Switzerland) ()
  • Japanese ()
  • Korean ()
  • Norwegian Bokmål ()
  • Polish ()
  • Portuguese ()
  • Romanian ()
  • Russian ()
  • Serbian ()
  • Slovak ()
  • Slovenian ()
  • Spanish ()
  • Swedish ()
  • Thai ()

Set the Checkout language

Change the translation for supported languages

<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

Localization of payment method labels

<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_order_review">Order Review</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>
<string name="checkout_layout_text_pay_with">Pay with</string>
<string name="checkout_layout_text_ship_to">Ship to</string>
<string name="checkout_layout_text_order_summary">Order summary</string>
<string name="checkout_layout_text_order_total">TOTAL</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>
<string name="checkout_layout_hint_account_number">Account Number</string>
<string name="checkout_layout_hint_account_verification">Account Verification</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>
<string name="checkout_helper_account_number">Account Number</string>
<string name="checkout_helper_account_verification">Account Verification</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>
<string name="checkout_error_account_number_invalid">Invalid account number</string>
<string name="checkout_error_account_expiration_date_invalid">Expiration date is not valid, use MM/YY or MM/YYYY format</string>
<string name="checkout_error_account_expired">Account is expired</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>