About the Locale Settings API

The Multilingual Locale Settings API provides functionality for managing a site's locale settings.

With the Locale Settings API, you can:

  • Retrieve and update a site's locale settings.
  • Enable or disable multilingual mode for a site. Multilingual mode allows a site to support multiple languages.
  • Manage how secondary languages appear in the site's URL structure.

Before you begin

It's important to note the following points before starting to code:

  • The Locale Settings API is active for every site, not just those with the Wix Multilingual app installed.
  • The Set Multilingual Mode method can only be called on sites where a Wix user has installed the Wix Multilingual app.
  • When a new site is created, a single locale settings object is automatically created and can't be deleted.
  • Changes to a site's locale settings, including changes to the multilingual mode, may have significant implications for the site's SEO, content, and structure.

Use cases

Terminology

  • Locale settings: An object that holds the site's multilingual configuration.
  • Multilingual mode: A setting that enables a site to support multiple locales.
  • Auto switch: A setting that automatically opens the live site in a secondary locale if it detects that the visitor's browser is set to that language.
  • URL structure: How secondary locales are resolved in the URL structure of the live site.
  • Primary locale: The locale in which the site is created, serving as the default language and regional settings. This locale serves as the base for translating to other locales.
  • Secondary locale: A locale on your site that is used to display translated content or localized versions on the site based on visitor preferences.
Did this help?