Title: Localize text
Last modified: August 20, 2016

---

# Localize text

 *  Resolved [Carmdq](https://wordpress.org/support/users/carmdq/)
 * (@carmdq)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/localize-text/)
 * I want to insert a title in my theme and make that title localizable. I DO know
   how to add the string in the POT file.
    What I do NOT now is how to declare the
   text in my .php file to indicate it should be localized. That means, how to write
   the code.
 * I’m trying to literally use <?php $translated_text = __( ‘text’, ‘domain’ ); ?
   >
 * but that didn’t work. Do I have to create a new function or something?
 * I appreciate a simple explanation since I’m totally new to php and localization.
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/localize-text/#post-3256073)
 * What you are doing is correct. Are you sure you have the right text domain name?
   What are you using to create the .po/.pot file?
 *  Thread Starter [Carmdq](https://wordpress.org/support/users/carmdq/)
 * (@carmdq)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/localize-text/#post-3256085)
 * I wrapped it in <h> tags after finding [this](http://blog-en.icanlocalize.com/installing-wordpress-for-multiple-language-blogs/how-to-localize-wordpress-themes-and-plugins-with-gettext/)
   and it’s working now. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Localize text’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Carmdq](https://wordpress.org/support/users/carmdq/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/localize-text/#post-3256085)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
