Title: Theme localization
Last modified: August 18, 2016

---

# Theme localization

 *  Resolved [notthatugly](https://wordpress.org/support/users/notthatugly/)
 * (@notthatugly)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/theme-localization/)
 * There’s an old theme I wrote right at the start of the 1.5 era when I was still
   hung up on doing things properly and did not yet know that nobody else cared 
   about plugin hooks or localization 😉 Well, to my astonishment somebody is now
   actually attempting a translation. So, since there are `__` and `_e`s in all 
   the right places I successfully extracted a .po file for her to work with. So
   far, so simple.
 * Trouble is, now we have no idea how to get the theme to use the translated strings.
   As usual, the Codex is no help. I found [this tutorial](http://www.zyblog.de/2006/01/15/localizing-wordpress-themes/2/),
   but it says I’d need to go through all my strings adding a textdomain to them.
   Is this really necessary? In the absence of any docs I used Classic as a model,
   and that just uses __ and _e with no other parameters.
 * Sigh. Stuff like this reminds me why I gave up theming in the first place.

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

 *  Thread Starter [notthatugly](https://wordpress.org/support/users/notthatugly/)
 * (@notthatugly)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/theme-localization/#post-545178)
 * Is 22 hours an acceptable time to leave before bumping? Regardless. Bump.
 *  [ala_747](https://wordpress.org/support/users/ala_747/)
 * (@ala_747)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/theme-localization/#post-545242)
 * Hi.
 * You have two ways to do it:
    1. using a new textdomain as the ZyBlog tutorial says (this allow you to use your
       own theme’s POT with personalized strings);
    2. using exactly the same strings that WP **Classic** Theme uses because those 
       strings ARE on the WordPress default textdomain POT. (ex: you MUST use `<?php
       _e("Filed under:"); ?>` before your post categories listing.)
 * In addition to the last option, you can “tweak” the thing (if you will NOT use
   the blog theme in english) changing the strings in english for the string that
   you really need in the translation. (ex: you won’t use the string “Filed under:”
   but you need one that says -after translation- “Mis fotos” -My Photos, in english-
   so you won’t use `<?php _e("Filed under:"); ?>` before a list of post categories
   but between <h3> as the title of your Flickr photos plugin.)
 * I don’t recommend the tweaks while they are not **essential**.
 * If you plan to release your i18n Theme I don’t recommend neither the second option(
   no so bad at all) or its tweaks (no, don’t do it… evil, evil evil). **The correct
   one is only the first option.**
 * Greetings!
 * n!
 *  [ala_747](https://wordpress.org/support/users/ala_747/)
 * (@ala_747)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/theme-localization/#post-545243)
 * BTW, you can hardcode the strings in the theme as the WP Default Theme does, 
   or copy & paste all your theme .po (translated) after the original WP .po and
   compile the default textdomain .mo including your strings.
 * Good luck!
 *  Thread Starter [notthatugly](https://wordpress.org/support/users/notthatugly/)
 * (@notthatugly)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/theme-localization/#post-545256)
 * Thank you! If only somebody had bothered to document this in the Codex back when
   i18n support was first introduced, it would have saved me a lot of time and confusion.
 *  [AleksCee](https://wordpress.org/support/users/alekscee/)
 * (@alekscee)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/theme-localization/#post-545316)
 * Where can I get a Version (possible german) of alex kings textdomain he try to
   use in “Share-This”?
 * if (function_exists(‘load_plugin_textdomain’)) {
    load_plugin_textdomain(‘alexking.
   org’); }
 * Thanks, Alex
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/theme-localization/#post-545317)
 * You cannot get a “textdomain”…
    That’s the code to call the plugin’s translation–
   if exist. see more: [http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/](http://boren.nu/archives/2004/11/01/localizing-plugins-and-themes/)
 *  [AleksCee](https://wordpress.org/support/users/alekscee/)
 * (@alekscee)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/theme-localization/#post-545318)
 * So I have to generate a “.mo” by myselfe?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [18 years, 10 months ago](https://wordpress.org/support/topic/theme-localization/#post-545319)
 * Basically, yes. A POT > a .po > a .mo file.

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

The topic ‘Theme localization’ is closed to new replies.

## Tags

 * [gettext](https://wordpress.org/support/topic-tag/gettext/)
 * [Localization](https://wordpress.org/support/topic-tag/localization/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)
 * [wp-advanced](https://wordpress.org/support/topic-tag/wp-advanced/)

 * 8 replies
 * 4 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [18 years, 10 months ago](https://wordpress.org/support/topic/theme-localization/#post-545319)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
