Web Payments SDK Localization

I’m going to integrate Square Web Payment into our multi language web app. My app supports en-US, es-US, fr-CA,… ect…

Looking at your example here, I didn’t see where to specify language / localization for the CardPay.

It can be automatic but what if I need to specify localization / language manually to meet the current user chosen language in our web app?

Please advice?

The Web Payments SDK determines the locale of the buyer’s browser automatically. However, your application can override localization by setting a configuration option. You can use
setLocale ( locale: string )
which sets the locale of the Payments instance. If this method is not called explicitly, the user’s browser language specified by navigator.language will be used instead. If the language returned by navigator.language is unsupported, the SDK falls back to en-US.

If the specified language passed to setLocale() is not supported, the operation is a no-op. If the specified language is supported, but the specified region is not, Web Payments SDK will fall back to using the desired language in a different supported region. :slightly_smiling_face: