Title: $domain variable???
Last modified: August 20, 2016

---

# $domain variable???

 *  Resolved [pixelsailor](https://wordpress.org/support/users/pixelsailor/)
 * (@pixelsailor)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/domain-variable/)
 * Many themes use the $domain variable in instances where it doesn’t seem to do
   anything. Example: <?php _e(‘hello world’, ‘twentyeleven’) ?> I’ve been searching
   all over for an answer and can’t figure out what it’s used for or how to properly
   set it to no avail. Closest I found was a 5yo topic that was closed with no answer.
   Does it need to be the same as the theme name? The theme directory? Does it even
   matter?
 * Thanks

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

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/domain-variable/#post-2400052)
 * that is the text domain for translation
 * [http://codex.wordpress.org/I18n_for_WordPress_Developers](http://codex.wordpress.org/I18n_for_WordPress_Developers)
 * and more specific to your question
    [http://codex.wordpress.org/I18n_for_WordPress_Developers#I18n_for_theme_and_plugin_developers](http://codex.wordpress.org/I18n_for_WordPress_Developers#I18n_for_theme_and_plugin_developers)
 *  Thread Starter [pixelsailor](https://wordpress.org/support/users/pixelsailor/)
 * (@pixelsailor)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/domain-variable/#post-2400107)
 * Ok, thanks for the reply. I had actually seen that page before but didn’t spend
   much time with it. But it seems the gist of it is that it $domain should match
   the plugin name or theme directory name and isn’t necessary except for handling
   localization in particular ways.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/domain-variable/#post-2400151)
 * Yup, If you aren’t localizing, you wouldn’t need to even worry yourself with 
   it.
 * If there is ever a chance of you releasing anything you do out in the wild though,
   it’s best to start out properly using the coding practices to allow for translation.
 * There are a lot of thorough tuts on the google machine about the topic if yer
   interested

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

The topic ‘$domain variable???’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/domain-variable/#post-2400151)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
