Localisation

The ekko SDKs support multiple languages. You control the language by passing the locale parameter when you initialise the SDK or create a quote.

Supported languages

LanguageLocales
Arabicar-SA, ar-EG, ar-MA, ar-DZ, ar-TN, ar-LB, ar-SY, ar-JO, ar-PS, ar-IQ, ar-SD, ar-AE, ar-QA, ar-KW, ar-OM, ar-BH, ar-YE
Englishen-GB, en-AU, en-NZ, en-IE, en-IN, en-ZA, en-SG, en-HK, en-US, en-CA, en-PH
Estonianet-EE
Frenchfr-FR, fr-BE, fr-CH, fr-CA, fr-LU, fr-MC, fr-CI, fr-SN, fr-ML, fr-MA, fr-DZ, fr-TN, fr-CM, fr-HT, fr-RE, fr-PF, fr-GP, fr-MQ, fr-YT, fr-NC
Germande-DE, de-AT, de-CH
Italianit-IT, it-CH
Latvianlv-LV
Lithuanianlt-LT
Portuguesept-PT, pt-AO, pt-MZ
Spanishes-ES, es-MX, es-AR, es-CL, es-CO, es-PE, es-VE, es-UY, es-PY, es-BO, es-EC, es-CU, es-DO, es-PR, es-US, es-GT, es-SV, es-HN, es-NI, es-CR, es-PA, es-GQ

If the requested locale isn't supported, the SDK and API default to en-GB.

ℹ️

Need a language that isn't listed?

Get in touch at [email protected].

How to set the locale

Checkout SDK

Pass the locale option when you initialise the SDK:

import { initCheckout } from '@ekko-earth/checkout-js'

const checkout = initCheckout({
  container: '#ekko-checkout-container',
  sessionId: session.sessionId,
  clientSecret: session.clientSecret,
  mode: 'sandbox',
  locale: 'fr-FR'
})

Direct API integration

Pass the locale field in the request body when creating a quote:

{
  "locale": "fr-FR"
}

See Create a carbon quote for the full request schema.


Did this page help you?