Skip to content

feat: add support for new locales - #1746

Open
sakksham7 wants to merge 1 commit into
mainfrom
feat/add-new-locale-support
Open

feat: add support for new locales#1746
sakksham7 wants to merge 1 commit into
mainfrom
feat/add-new-locale-support

Conversation

@sakksham7

Copy link
Copy Markdown
Contributor

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

#1745
Added localization support for 13 new languages in the payment SDK:

  • Danish (da)
  • Lithuanian (lt)
  • Czech (cs)
  • Slovak (sk)
  • Icelandic (is)
  • Welsh (cy)
  • Greek (el)
  • Estonian (et)
  • Finnish (fi)
  • Norwegian (nb)
  • Bosnian (bs)
  • Malay (ms)
  • Turkish (tr-CY)

Each locale includes translations for all SDK UI strings — card form labels and validation error messages, billing details, bank debit terms (ACH/SEPA/BECS), payment method names, gift card flows, installments, surcharges, and payout status messages. Translations are sourced from the shared-code locale assets, with SDK-specific strings translated to match.
The new locales are registered in the locale type system, locale string mapping (with base-language fallbacks, e.g. no/nn resolve to nb, tr resolves to tr-CY), and are lazy-loaded on demand like existing locales. Merchants can enable them by passing the corresponding locale code to the SDK, and browser_language/auto detection will pick them up automatically.

How did you test it?

  • Ran npm run re:build — all 13 new locales compile successfully with no errors or warnings introduced.
  • Added all 13 locale codes to the existing Cypress "SDK Loads for All Supported Locales" e2e suite, which verifies the SDK loads and renders the card form for each locale.
  • Manually verified the widget renders translated strings (labels, placeholders, error messages, payment method names) by loading the SDK with each new locale code.
    Test Icelandic locale
Screen.Recording.2026-09-03.at.4.20.22.AM.mov

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

@semanticdiff-com

semanticdiff-com Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/e2e/01-sdk-core/locale-i18n.cy.ts  0% smaller
  src/CardTheme.res Unsupported file format
  src/LocaleStrings/BosnianLocale.res Unsupported file format
  src/LocaleStrings/CzechLocale.res Unsupported file format
  src/LocaleStrings/DanishLocale.res Unsupported file format
  src/LocaleStrings/EstonianLocale.res Unsupported file format
  src/LocaleStrings/FinnishLocale.res Unsupported file format
  src/LocaleStrings/GreekLocale.res Unsupported file format
  src/LocaleStrings/IcelandicLocale.res Unsupported file format
  src/LocaleStrings/LithuanianLocale.res Unsupported file format
  src/LocaleStrings/LocaleStringHelper.res Unsupported file format
  src/LocaleStrings/LocaleStringTypes.res Unsupported file format
  src/LocaleStrings/MalayLocale.res Unsupported file format
  src/LocaleStrings/NorwegianLocale.res Unsupported file format
  src/LocaleStrings/SlovakLocale.res Unsupported file format
  src/LocaleStrings/TurkishLocale.res Unsupported file format
  src/LocaleStrings/WelshLocale.res Unsupported file format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant