# How to add new string in Polylang

In order for Polylang to know what to translate, it is necessary to register the words that need to be translated. Polylang, by default, withdraws all the words that it believes should be translated and placed in Strings Translations. However, the problem is the words that Polylang does not see as the words to be translated.

Here is an example of the words that I added in **Strings Translations**, which Polylang did not immediately withdraw, can be seen to be important words that should also be translated:

![](https://ivanblagojevic.com/wp-content/uploads/2018/04/polylang-strings-translations-1.jpg)

Here’s what you need to do. Find the string that you need to be registered. I need to register **Sign Out**, so I went to **header.php** (file in the child theme) and found the row containing:

\<?php \_e('Sign Out', 'golo-framework'); ?>

Therefore, you need to register **Sign Out**. When you find out, go to **functions.php** (file in the theme) and add the following line to the bottom:

pll\_register\_string('golo-framework', 'Sign Out', 'true');

From that moment, the Sign Out string is located in **Strings Translations** and you can add translations for the languages that you have set up in Polylang.

#### **Insert translation for registered strings**

Go to **Strings Translations** and add translations for the new string:

![](https://ivanblagojevic.com/wp-content/uploads/2018/04/string-prevod-1.jpg)

Quite simply, but that’s not enough. Now we have made Polylang aware of what the words should offer the translation we have inserted, but Polylang still does not know where to show these words. You need to do the following.

#### **Calling for translated strings**

Return to the **header.php** file and replace:

\<?php \_e('Sign Out', 'golo-framework'); ?>

Instead, place:

\<?php echo pll\_e('Sign Out')?>

And that is that. Now you have informed Polylang that the Sign Out option should change **depending on the language** that is selected on the site.

This procedure should be repeated for each word-string to be translated. Keep in mind that strings are in different theme files, and all the strings can be registered through the **functions.php** file.


---

# Agent Instructions: 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:

```
GET https://uxper.gitbook.io/wp-golo/faqs/how-to-add-new-string-in-polylang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
