[theme-reviewers] Proposed WordPress 3.3 Theme Review Guidelines Revisions

Otto otto at ottodestruct.com
Thu Nov 10 21:14:31 UTC 2011


On Thu, Nov 10, 2011 at 3:02 PM, Tyler Cunningham
<seizedpropaganda at gmail.com> wrote:
> I have a question regarding one of the items on the list:
>
> Internationalization:
>
> Themes are REQUIRED to use a string, rather than a variable, constant, or
> concatenation, as the textdomain in translation functions.
>
> Why should this be required? By using a variable someone can very easily
> change the text domain as needed wether it be for a child or derivative
> theme. I really don't see the reasoning behind this one, so could someone
> please enlighten me?

Short answer: Because it doesn't work.

Long answer: Code that is not PHP has to parse these things. The
format is set by the gettext standards, and gettext is not a PHP
parser. It can't possibly know what the content of that variable is.
So it can't read it and so it can't generate the pomo stuff properly.

-Otto


More information about the theme-reviewers mailing list