Title: [Plugin: Polylang] How to use String Translation?
Last modified: August 20, 2016

---

# [Plugin: Polylang] How to use String Translation?

 *  [Nikk](https://wordpress.org/support/users/nikk/)
 * (@nikk)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-polylang-how-to-use-string-translation/)
 * I’m using the Polylang plugin for a multilingual website, but I can’t figure 
   out how to use
    the string translation functionality for translating custom lines.
 * I added this line to my functions.php:
 * `pll_register_string('Test Textblock', $testtextblock);`
 * And I put this line in my page template:
 * `<?php pll__('Test Textblock'); ?>`
 * But yet nothing shows up in the ‘Strings Translation’ tab of the Polylang plugin.
   
   I’d like to add more strings to the Strings Translation tab, to make the whole
   website multilingual. I hope someone here can help me out with this, thanks!

Viewing 1 replies (of 1 total)

 *  [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-polylang-how-to-use-string-translation/#post-3179972)
 * Are you sure that $testtextblock contains a non empty string?
 * `<?php pll__('Test Textblock'); ?>` won’t work. The original string that will
   be translated is the second parameter of the pll_register_string function. The
   first parameter is provided only for convenience to sort strings in the translations
   list table. Moreover pll__ does not echo the string. Either use `echo pll__(...)`
   or `pll_e(...)`.
 * Example:
 *     ```
       if (is_admin())
         pll_register_string('custom translation', 'my string to translate');
       else
         echo pll__('my string to translate');
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Polylang] How to use String Translation?’ is closed to new replies.

## Tags

 * [strings translation](https://wordpress.org/support/topic-tag/strings-translation/)

 * 1 reply
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/plugin-polylang-how-to-use-string-translation/#post-3179972)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
