Working with Localization APIs
Webflow offers APIs that enable you to manage site content across different locales. Use the APIs to localize content for pages, components, and CMS items on your site.
For detailed information on enabling localization, see the help center documentation
Localizable content
Webflow supports the localization of text-based content across pages, components, and CMS items.
Data APIs do no support localizing images
Currently, the Data API doesn’t support localizing images. To localize images, you’ll need to update the image asset in the Webflow designer.
Locales
When localizing a site, you’ll define different locales to support specific languages or language-region combinations. These locales will be used to present content to users in different geographical areas or cultural backgrounds.
Locales can be defined as either primary or secondary.
The default language for your site. There can only be one primary locale per site.
Additional languages or regions for your site. The number of secondary locales you can have is limited by your Webflow plan.
Locale identifiers
Once your locales are defined, you can retrieve the identifiers for each locale, which are needed for all requests to the Localization APIs. To get the identifiers, make a call to the Get Site endpoint.
Primary and secondary locales
The primary
property contains a single locale object, while the secondary
property contains an array of locale objects.
Locale properties
The locale object contains the following properties relevant to the localization APIs:
id
: The unique identifier of the locale.cmsLocaleId
: The unique identifier of the locale for CMS operations.
To see all the properties of a locale, see the Locale object in the API reference.
Locale parameters and properties
When making requests to endpoints that support localization, provide the locale identifier as a query parameter or in the request body, depending on the endpoint. If no locale identifier is provided, the request will return information from the primary locale. These identifiers are both used as parameters in your requests and returned as properties in the response body to indicate when you’re working with locale-specific data:
localeId
: The unique identifier of the locale for pages and components.cmsLocaleId
: The unique identifier of the locale for CMS operations.
Locale-specific endpoints
Some endpoints only support updating content in secondary locales. For these, you must provide the localeId
parameter; otherwise, requests to update primary locale content will fail. These endpoints include:
Workflows
Localizing content in Webflow can be done across three main areas:
Static page content, metadata, and SEO settings
Reusable elements that can be customized with dynamic properties
Organized, dynamic content within collections
Components
Components are reusable design elements that contain static content, set in the component definition, and dynamic content, which can be customized with component properties.
When localizing components in a secondary locale, you can use two approaches:
- Localize the component definition: Modify a component’s definition to update its static content, default property values, and any nested components. These changes apply to all instances of the component for the specified locale.
- Localize a component instance: Override properties on a specific component instance on a page. This provides unique content for that instance without affecting the component’s definition or other instances.
Example scenario
Consider a Call-to-Action
component with a button that has the text property “Learn More.”
-
Definition localization: To change the button text for all French-speaking users, you would update the component definition in the French locale. The button text in all
Call-to-Action
component instances on your French site would automatically change to “En savoir plus” -
Instance localization: On a specific landing page in the French locale, you might want a
Call-to-Action
button to have a unique message. You would override the text property on that component instance to “Découvrez nos offres spéciales.” This change would only apply to that single instance.
To understand the difference between definition localization and instance localization, see the “Working with Components” guide.
Webflow CMS
The Webflow CMS enables you to manage and deliver dynamic content, and supports comprehensive content localization to scale content delivery for diverse audiences.
Key localization features include:
- Localized Variants: Items from your primary locale can have corresponding localized variants, all sharing a single, consistent ID.
- Independent Publishing: Publish localized content variants individually as needed.
- Locale-Specific Items: Create CMS items that exist solely within a specific locale, without a primary locale counterpart.
Glossary
- Locale: A specific language or language-region combination used to present content (e.g.,
en-US
for English,fr-FR
for French). - Primary Locale: The default language version of your site. There can only be one primary locale. API requests default to this locale if no other is specified.
- Secondary Locale: Any additional language or regional version of your site content.
localeId
: The unique identifier for a locale, used when working with Pages and Components APIs.cmsLocaleId
: The unique identifier for a locale, used specifically for CMS-related API operations.
Frequently asked questions
What's the difference between localeId and cmsLocaleId?
localeId
is used for localizing page and component content. cmsLocaleId
is used exclusively for localizing CMS items. Both are retrieved from the Get Site endpoint.
Can I update primary locale content via the API?
Currently, API-based updates to page and component content are limited to secondary locales. Primary locale content for pages and components must be updated through the Webflow Designer. However, you can create and manage CMS item content in both primary and secondary locales via the API.
Can I localize styles and classes via the API?
No, styles and classes can’t be localized via the Data API. They’re managed through the Webflow Designer and aren’t supported by the Data API.
What happens if I don't provide a locale identifier in my API request?
If no locale identifier is specified, the API will default to the site’s primary locale for the request.