About the Translations API

The Translations API gives you the translated strings for your component's text, such as button labels and messages, in the language the page is shown in. Use it so your component shows translated text instead of hard-coded strings.

With the Translations API, you can:

  • Retrieve a translated string by its key, with a fallback for when there's none.
  • Retrieve every translated string in a namespace at once.

Before you begin

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

  • The strings can change while the page is open, for example when a Wix user adds a component or changes the site's language in the editor. Read them while a component renders, so the component updates when they change.

Use cases

Terminology

  • Namespace: A named group of translated strings. A component's strings are in the namespace named after its component type.
  • Key: The name of a translated string in its namespace.

SDK setup

@wix/site-service-translations

To use the API, install the @wix/site-service-translations package:

Copy

Import the package

Copy

Import types

Import any type shown in these docs from @wix/site-service-translations/types:

Copy

Resolve the service

In a React component, resolve the service with the useService hook:

Copy

Last updated: 21 October 2026

Did this help?