[theme-reviewers] Is this the best solution to translate a template name in WordPress

Zen Oven zenoven at gmail.com
Wed Aug 28 16:08:08 UTC 2013

Thanks so much for all of you, I will try it later.

2013/8/28 Otto <otto at ottodestruct.com>

> On Wed, Aug 28, 2013 at 10:17 AM, Zen Oven <zenoven at gmail.com> wrote:
> > Hi,
> >
> > I am a theme author and I know how to translate strings in WordPress with
> > __(), _e and some other PHP functions, but I have no idea how to
> translate a
> > template name because the template name is written with PHP comment in
> the
> > header.
> >
> > I found this on stackoverflow >>
> >
> http://stackoverflow.com/questions/13561410/how-to-translate-a-wordpress-template-name
> >
> > Is this the best solution ?
> WordPress does allow for translation of the fields in the Headers via
> the "Text Domain" and "Domain Path" headers. These should be the text
> domain of the theme, and the relative path in the theme to the
> translation files, respectively. Header fields are then passed through
> those domains using the translate() functions.
> However, dummy text isn't needed to put them into the translation POT
> file. Look at Twenty Thirteen's POT file for example. It just has the
> various headers added on at the end. If you're using the WordPress
> makepot.php tools to generate your pot files, it will add these
> headers into the POT file for you automatically.
> See tools here: http://i18n.svn.wordpress.org/tools/trunk/
> Now, for the specific case of "Template Name", I think it leaves that
> one out. But you can add them manually to the POT file, or modify the
> tool to add those as well. A dummy entry as suggested in the
> stackexchange post will work too, but obviously isn't particularly
> ideal.
> -Otto
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

Zenoven , twitter @zenoven <https://twitter.com/zenoven> / website
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130829/248f25c6/attachment.html>

More information about the theme-reviewers mailing list