Localization

Language utilities exposed to the storefront

Switch active language

post

Wraps Django’s set_language helper to change the active UI language.

Behaviour

  • Persists the selected language in session

  • Redirects to next parameter (defaults to homepage)

  • Supports AJAX clients (returns 200 without redirect when applicable)

Body

Form payload used by set_language

languagestringRequired

Language code defined in Django LANGUAGES

Example: en
nextany ofOptional

Optional redirect path after switching language

Example: /account/
stringOptional
Responses
chevron-right
200

Language changed (AJAX fallback)

No content

post
/i18n/setlang/

No content

List active and available languages

get

Returns the active language, default language, and available language map sourced from Django settings.

Responses
chevron-right
200

Languages listed

application/json
get
/languages/
200

Languages listed

Last updated

Was this helpful?