Title: Hey hey Polyglotters I have a question from&#8230;
Author: Siobhan
Published: October 15, 2013

---

 [  ](https://profiles.wordpress.org/siobhan/) [Siobhan](https://profiles.wordpress.org/siobhan/)
1:28 pm _on_ October 15, 2013      

# Hey hey Polyglotters I have a question from…

Hey hey Polyglotters!

I have a question from the docs team. Should all code examples in the codex and 
other official WP documentation be internationalized? There’s a strong case for 
it as many people just cut and paste code examples and then we end up with untranslatable
stringsString A string is a translatable part of the software. A translation consists
of a multitude of localized strings..

Anyhow, please let me know if you have any comments here, or please come to our 
chat on [Thursday October 17th at 16:00 UTC](https://www.timeanddate.com/worldclock/fixedtime.html?iso=20131017T1600)
in #wordpress-sfd

Thanks!

### Share this:

 * [  Threads ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=threads)
 * [  Bluesky ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=bluesky)
 * [  Facebook ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=facebook)
 * [  X ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=x)
 * [  Mastodon ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=mastodon)
 * [  WhatsApp ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=jetpack-whatsapp)
 * [  LinkedIn ](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?share=linkedin)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fpolyglots%2F2013%2F10%2F15%2Fhey-hey-polyglotters-i-have-a-question-from%2F%23respond&locale=en_US)

 * [To-do](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?output_format=md#)

 1.  ![](https://secure.gravatar.com/avatar/b518a5cf86a31ce1c2a64870b6e15a1e63e9827afc75f8fc12f7095d0cce7fb4?
     s=32&d=mm&r=g)
 2.   [Marko Heijnen](https://profiles.wordpress.org/markoheijnen/)  1:31 pm _on_ October
     15, 2013
 3.  They should but the problem is that most developers don’t understand what those
     functions really do.
      This also reminds me that I still need to revert a change
     on [https://codex.wordpress.org/Function_Reference/register_post_type](https://codex.wordpress.org/Function_Reference/register_post_type).
 4.   * ![](https://secure.gravatar.com/avatar/8a68c8e0b8b9d1f11aa1744b34a31930327e32f9e865c147592bc8f44bb499d7?
        s=32&d=mm&r=g)
      *  [Chantal Coolsma](https://profiles.wordpress.org/chantalc/)  1:31 pm _on_ 
        October 15, 2013
      * Agree
      * ![](https://secure.gravatar.com/avatar/78e12b0e0fd945bd7d661af2b0ca95c1509d09a7a1f528ded21bbd604192c662?
        s=32&d=mm&r=g)
      *  [Siobhan](https://profiles.wordpress.org/siobhan/)  1:32 pm _on_ October 15,
        2013
      * Out of curiosity, which change are you reverting and why?
         - ![](https://secure.gravatar.com/avatar/191a5715ee9d255a813f8a14b67af7bb97b16b0583ec04fd1f1236a80d6f17c1?
           s=32&d=mm&r=g)
         -  [toscho](https://profiles.wordpress.org/thefuxia/)  1:34 pm _on_ October
           15, 2013
         - [This edit](https://codex.wordpress.org/index.php?title=Function_Reference%2Fregister_post_type&oldid=124208&diff=122675)
           reverted the translation of custom post typeCustom Post Type WordPress can
           hold and display many different types of content. A single item of such 
           a content is generally called a post, although post is also a specific post
           type. Custom Post Types gives your site the ability to have templated posts,
           to simplify the concept. stringsString A string is a translatable part of
           the software. A translation consists of a multitude of localized strings..
 5.  ![](https://secure.gravatar.com/avatar/1a7df76f4f6519a5618c32428b277a5c7a89798394965b67e50528ca57c1b5a8?
     s=32&d=mm&r=g)
 6.   [Andrew Nacin](https://profiles.wordpress.org/nacin/)  1:44 pm _on_ October 15,
     2013
 7.  The two primary issues with internationalizing code examples is:
 8.   * It increases the barrier to entry, as any understanding of any code example
        requires one to understand internationalizationInternationalization Internationalization(
        sometimes shortened to **I18N** , meaning “I - eighteen letters -N”) is the
        process of planning and implementing products and services so that they can
        easily be adapted to specific local languages and cultures, a process called
        localization. This is the process of making software translatable. Information
        about Internationalization for developers can be found in the [Developer’s handbooks](https://developer.wordpress.org/).,
        which in most situations is _not_ a requirement for their simplistic, non-distributed,
        English-only usage.
      * Just using the internationalization function doesn’t internationalize the code.
        They still need to have a proper text domain and actually load that text domain,
        and be using this code in a pluginPlugin A plugin is a piece of software containing
        a group of functions that can be added to a WordPress website. They can extend
        functionality or add new features to your WordPress websites. WordPress plugins
        are written in the PHP programming language and integrate seamlessly with WordPress.
        These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
        or can be cost-based plugin from a third-party. or theme they are going to 
        release through WordPress.orgWordPress.org The community site where WordPress
        code is created and shared by the users. This is where you can download the
        source code for WordPress core, plugins and themes as well as the central location
        for community conversations and organization. [https://wordpress.org/](https://wordpress.org/),
        or otherwise work with translators. Using the proper functions is “nice” but
        it is arguably a disservice.
 9.   * ![](https://secure.gravatar.com/avatar/d29a38894bd3b73c20c139124e5c1b5a466cce7c25781fc3e1d32654b60c9a71?
        s=32&d=mm&r=g)
      *  [Remkus de Vries](https://profiles.wordpress.org/defries/)  1:52 pm _on_ October
        15, 2013
      * As much as I would like to disagree I do agree with your valid points. However,
        when displaying generic code it would be nice to have a default link to the
        Codex entry about internationalizationInternationalization Internationalization(
        sometimes shortened to **I18N** , meaning “I - eighteen letters -N”) is the
        process of planning and implementing products and services so that they can
        easily be adapted to specific local languages and cultures, a process called
        localization. This is the process of making software translatable. Information
        about Internationalization for developers can be found in the [Developer’s handbooks](https://developer.wordpress.org/)..
      * ![](https://secure.gravatar.com/avatar/191a5715ee9d255a813f8a14b67af7bb97b16b0583ec04fd1f1236a80d6f17c1?
        s=32&d=mm&r=g)
      *  [toscho](https://profiles.wordpress.org/thefuxia/)  2:34 pm _on_ October 15,
        2013
      * I have to support the pluginPlugin A plugin is a piece of software containing
        a group of functions that can be added to a WordPress website. They can extend
        functionality or add new features to your WordPress websites. WordPress plugins
        are written in the PHP programming language and integrate seamlessly with WordPress.
        These can be free in the WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
        or can be cost-based plugin from a third-party. Multilingual Press, and one
        common request is the translation of Custom Post TypeCustom Post Type WordPress
        can hold and display many different types of content. A single item of such
        a content is generally called a post, although post is also a specific post
        type. Custom Post Types gives your site the ability to have templated posts,
        to simplify the concept./TaxonomyTaxonomy A taxonomy is a way to group things
        together. In WordPress, some common taxonomies are category, link, tag, or 
        post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies).
        properties. But this is the responsibility of the authors, not of our plugin.
        Unfortunately, most (new) developers just copy and paste Codex examples.
      * All I can say to these authors right now is: Please ignore the Codex, the examples
        are wrong for distributed code. This is not good.
      * It wouldn’t raise the barrier too much to create correct examples. We could
        use the stringString A string is a translatable part of the software. A translation
        consists of a multitude of localized strings. `insert_your_textdomain` as text
        domain and add a link to the example. But the code should be translatable from
        the start.
 10. ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
     s=32&d=mm&r=g)
 11.  [Xavier Borderie](https://profiles.wordpress.org/xibe/)  2:21 pm _on_ October
     15, 2013
 12. No, because of what Andrew said.
 13. That being said, every code sample with stringsString A string is a translatable
     part of the software. A translation consists of a multitude of localized strings.
     should have a line at the bottom saying, more or less, “Code is simplified for
     readability reasons. Product code should have [all the strings internationalized](https://codex.wordpress.org/I18n_for_WordPress_Developers)“.
 14.  * ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
        s=32&d=mm&r=g)
      *  [Xavier Borderie](https://profiles.wordpress.org/xibe/)  2:21 pm _on_ October
        15, 2013
      * Ahem, “Production code”.
      * ![](https://secure.gravatar.com/avatar/1718b7c2f2afc31b4e94805b6f1f6ae2b802cc4c696f99b11fde2186006c82c9?
        s=32&d=mm&r=g)
      *  [swissspidy](https://profiles.wordpress.org/swissspidy/)  2:31 pm _on_ October
        15, 2013
      * Agree with that that one. It just should be obvious enough to not miss it.
      * ![](https://secure.gravatar.com/avatar/aa89edf971372c035a02c633667412facd8b00fd6946fe4f208f7aed7f7bb524?
        s=32&d=mm&r=g)
      *  [Naoko Takano](https://profiles.wordpress.org/nao/)  2:39 am _on_ October 
        16, 2013
      * This sounds like a good compromise.
 15. ![](https://secure.gravatar.com/avatar/8c5abaaf0366d5ddc1f8d034cb424091e06292ae0075026fe5905ff333fdbf9d?
     s=32&d=mm&r=g)
 16.  [Stefano Aglietti](https://profiles.wordpress.org/steveagl/)  5:20 pm _on_ October
     15, 2013
 17. No, the scope of code in codex page is to acts as a tutorial, for italian pages
     i’m usually translate comments and sometimes variable names if the meanings of
     them need to be render in italian. Adding I18NInternationalization Internationalization(
     sometimes shortened to **I18N** , meaning “I - eighteen letters -N”) is the process
     of planning and implementing products and services so that they can easily be 
     adapted to specific local languages and cultures, a process called localization.
     This is the process of making software translatable. Information about Internationalization
     for developers can be found in the [Developer’s handbooks](https://developer.wordpress.org/).
     is as Andrew says mor bad than good and fragment of code need to be tedomained
     too ecc. Like the Xavier’s idea to add a note at the end of code fragments
 18.  * ![](https://secure.gravatar.com/avatar/b518a5cf86a31ce1c2a64870b6e15a1e63e9827afc75f8fc12f7095d0cce7fb4?
        s=32&d=mm&r=g)
      *  [Marko Heijnen](https://profiles.wordpress.org/markoheijnen/)  10:20 am _on_
        October 18, 2013
      * If the scope of codex is to act as a tutorial. Shouldn’t it do I18NInternationalization
        Internationalization (sometimes shortened to **I18N** , meaning “I - eighteen
        letters -N”) is the process of planning and implementing products and services
        so that they can easily be adapted to specific local languages and cultures,
        a process called localization. This is the process of making software translatable.
        Information about Internationalization for developers can be found in the [Developer’s handbooks](https://developer.wordpress.org/).
        then too. Otherwise the tutorial isn’t complete. Codex is to learn things what
        you need and I18N is a must to do things good.
         - ![](https://secure.gravatar.com/avatar/78e12b0e0fd945bd7d661af2b0ca95c1509d09a7a1f528ded21bbd604192c662?
           s=32&d=mm&r=g)
         -  [Siobhan](https://profiles.wordpress.org/siobhan/)  11:29 am _on_ October
           18, 2013
         - Although there are pages of the Codex that function as tutorials, overall
           it is a reference – i.e. it’s for looking for specific things that you need
           to know. The handbooks will be more of a tutorial and i18nInternationalization
           Internationalization (sometimes shortened to **I18N** , meaning “I - eighteen
           letters -N”) is the process of planning and implementing products and services
           so that they can easily be adapted to specific local languages and cultures,
           a process called localization. This is the process of making software translatable.
           Information about Internationalization for developers can be found in the
           [Developer’s handbooks](https://developer.wordpress.org/). are being built
           into it.
 19. ![](https://secure.gravatar.com/avatar/eae9b03fdf1750ad9ecddf610003712fb406bce09006a0c4596071960057ea0e?
     s=32&d=mm&r=g)
 20.  [Ulrich](https://profiles.wordpress.org/grapplerulrich/)  8:42 pm _on_ October
     15, 2013
 21. The reasons why the stringsString A string is a translatable part of the software.
     A translation consists of a multitude of localized strings. should be internationalized.
 22.  * Most examples will be copied and pasted
      * InternationalizationInternationalization Internationalization (sometimes shortened
        to **I18N** , meaning “I - eighteen letters -N”) is the process of planning
        and implementing products and services so that they can easily be adapted to
        specific local languages and cultures, a process called localization. This 
        is the process of making software translatable. Information about Internationalization
        for developers can be found in the [Developer’s handbooks](https://developer.wordpress.org/).
        is an important part the code.
      * It is a hassle to internationalize all strings at a later stage, loading the
        text domain later is relatively easy.
      * This is where developers come in contact with internationalization
      * They only need to understand it once and they will understand every snippet.
 23. Developers need to understand php before they can use functions so they need to
     understand internationalize before they use strings.
 24. I know this should be discussed somewhere else but this also raises the question
     about the escape and sanitization functions in code examples.
 25. ![](https://secure.gravatar.com/avatar/87d1a16a387f40e98c0195a51d277d413bc80b04453954f01bd477d697435257?
     s=32&d=mm&r=g)
 26.  [Nashwan Doaqan](https://profiles.wordpress.org/alex-ye/)  10:08 am _on_ October
     16, 2013
 27. I vote for “No”, I agree with @Andrew Nacin and @Xavier Borderie comments.

### Leave a Reply 󠀁[Cancel reply](https://make.wordpress.org/polyglots/2013/10/15/hey-hey-polyglotters-i-have-a-question-from/?output_format=md#respond)󠁿

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fpolyglots%2F2013%2F10%2F15%2Fhey-hey-polyglotters-i-have-a-question-from%2F&locale=en_US)
to post a comment.

# Post navigation

[← I don’t see 3.7 x or trunk project…](https://make.wordpress.org/polyglots/2013/10/11/i-dont-see-3-7-x-or-trunk-project/)

[G’day Can we get all the things for… →](https://make.wordpress.org/polyglots/2013/10/17/gday-can-we-get-all-the-things-for/)