About the Locales API

The Multilingual Locale API allows you to manage a site's locales. By supporting multiple locales, a site can cater to different languages and regions, helping Wix users reach a global audience.

With the Locale API, you can:

  • Create, update, and delete locales for a site.
  • Retrieve and query locales.
  • Change a site's primary locale.
  • Retrieve a list of locales supported by Wix.

To retrieve or update a site's locale settings, or enable multilingual mode, refer to the Locale Settings API.

Before you begin

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

  • The Wix user must install the Wix Multilingual app on their site.
  • Create, update and delete methods can only be called on sites where multilingual mode is enabled.
  • You can't change a primary locale to a secondary locale that already exists on a site. You must first delete the secondary locale and then call Create New Primary Locale.
  • A site can have up to 200 locales and up to 100 visible locales.

Use cases

Terminology

  • Locale: A combination of the language and optional region code that defines how content should be displayed for a specific audience.
  • 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.
  • Visibility: The status of a locale.
    • Visible: Visible locales are visible to site visitors, meaning visitors can view the site in that locale.
    • Hidden: Hidden locales can't be accessed by site visitors, but are available to Wix users for translating content in that locale.
Did this help?