> For the complete documentation index, see [llms.txt](https://docs.claimr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claimr.io/localization.md).

# Localization

## What is campaign localization?

It is the process of translating and culturally adapting your campaign's text and user interface into multiple languages. Essentially, it means making your campaign accessible and understandable to people who speak different languages.

Using campaign localization offers several key benefits:

* **Reach a global audience:** By providing content in various languages, you can significantly expand your campaign's reach beyond a single linguistic group. This allows participants worldwide to engage with your campaign in a way that feels natural to them.
* **Enhance user experience:** Participants are more likely to interact with and understand your campaign when it's presented in their native language. This creates a more inclusive, user-friendly, and effective experience, leading to higher engagement and satisfaction.
* **Seamless integration: C**reate and link custom translations to any text field within your campaign. The platform then automatically displays the correct translation based on the user's active language. Plus, many system-level components are already translated by default, simplifying the process even further.

To enable localization in your campaign, simply add the desired languages in your settings using the steps below. While basic system elements will already be translated by default, you can customize additional texts in two ways:

* by creating custom keys in Customization → Localization
* by using the dedicated editor for Rich Text blocks (in forms, descriptions, challenges, etc.).

This article will guide you step-by-step through how this all works.

## **Add languages to your campaign**

First, declare which languages your campaign will support.

1. Navigate to the specific **Campaign** you want to localize.
2. Go to the campaign **Settings**.
3. Locate the **Languages** section. To make changes, click the **edit icon** (a pencil) on the right.

<figure><img src="/files/xV3wTLsTgsxzgTt80jAN" alt="" width="375"><figcaption></figcaption></figure>

4. The editable settings window will open

<figure><img src="/files/SbsjfGxWzURhS1rtaTu7" alt="" width="375"><figcaption></figcaption></figure>

* The **Language** field shows the campaign's default language.
* Click into the **Add more languages** field to see a dropdown list of available languages. Select one or more languages to add.

5. Click **Update** to save your changes. The **Languages** section will now display the default language and all additional languages you have enabled.

<figure><img src="/files/8snQxLeX5Rqq4VR521Gu" alt="" width="375"><figcaption></figcaption></figure>

Once you’ve added multiple languages to your campaign, you can let users choose their preferred language directly in the widget.

### Enable the language selector

In your campaign settings, turn on the Show language selector toggle. This adds a small language menu to the corner of the widget, so users can switch languages anytime.

### Preview translations during setup

While configuring your campaign, you can test how the widget appears in different languages using the built-in preview language selector. This option shows all available translations — even if not added to your live settings — and helps you check formatting and alignment.

### Set\_language method

You can control the widget language manually using the method `set_language(language).` This lets you align the widget with the rest of your site or app based on user preferences.&#x20;

## Customize localization&#x20;

### **Create a custom key**

<figure><img src="/files/DNKB6DQ1ZMNs4PBMzV09" alt=""><figcaption></figcaption></figure>

Go to **Customization** → **Localization** tab and within the JSON file for the relevant language:

* Create a key with any convenient name (for example: `my_custom_group_name`).
* Add the value for this key. For instance, for the key `my_custom_group_name`, you would enter "Name meiner Gruppe".

{% hint style="success" %}
The localization keys follow the [i18next](https://www.i18next.com/) format, which is the internationalization framework used in claimr.
{% endhint %}

&#x20;Example of creating a custom key in the localization editor for German

```json
{
  "my_custom_group_name": "Name meiner Gruppe"
}
```

### **Use your custom key**

Now, this key can be used anywhere in the system where there are name fields visible to the end-user:

* Group names
* Button names
* Quest names
* Action names
* Task descriptions
* Any other text displayed in the widget

For example, in the group settings, simply specify the key `group_name` as the value for the “Name” field.

<figure><img src="/files/X5NAUY0c9ZCy9KxcoN6R" alt="" width="375"><figcaption></figcaption></figure>

You can also reference specific campaign objects in your translations using dynamic keys. For example, {{task.name}} will automatically insert the current task’s name based on the active language.

This works for various object types such as task, group, quest, and action.

### **How it works in the Interface**

After the key has been added and applied to elements:

* In the widget, the system automatically inserts the translation according to the active language.
* If the user changes the language, the translation updates automatically.

<figure><img src="/files/Cv4IzCzFdR1sj6yLXV77" alt="" width="375"><figcaption><p> Quest card displaying content in German when selected</p></figcaption></figure>

The built-in language switcher works immediately if languages are activated in the general settings.

For example, if you switch the widget from English to German — the widget will show "Name meiner Gruppe" instead of the English name.

## Localize descriptions

Rich text descriptions are formatted content blocks used in forms, group descriptions, quest descriptions, and other areas where detailed text, images, or special formatting are needed. This localization method is separate from using custom translation keys for simple text strings, as it manages the entire formatted content block per language.

Firstly, ensure you have enabled languages for your campaign before localizing rich text descriptions. Refer to the "Add languages to your campaign" section for instructions.

1. **Access the Rich text editor:** Navigate to where you need to create or edit a rich text description. The rich text editing window will open.
2. **Enter your default language content:** The editor defaults to **English**. Create your complete description in English, using all available rich text formatting tools (bold, lists, images, etc.).

<figure><img src="/files/IcxF2aqFaRPX9OdwjoRg" alt="" width="375"><figcaption></figcaption></figure>

1. **Switch languages:** Use the language selector in the bottom right corner of the editor to switch to another active language.
2. **Add localized content:** The content area will clear. Enter the full description for the newly selected language. You are creating an independent, formatted content block for each language.&#x20;
3. **Repeat for all languages:** Continue switching between languages and creating a unique rich text description for each.
4. **Save your changes:** Click the **Save** button. A single save action saves all the localized versions you've created within that rich text block.

### How it works in the interface

After the localized rich text descriptions are saved:

* In the widget, the system automatically displays the correct rich text description based on the active language.
* If the user changes the language using the built-in language switcher, the rich text content updates automatically.
* **Important:** Rich text descriptions do **not** use custom localization keys. You directly input the full content for each language in the editor.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.claimr.io/localization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
