<div dir="ltr">Thanks so much for all of you, I will try it later.</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/28 Otto <span dir="ltr"><<a href="mailto:otto@ottodestruct.com" target="_blank">otto@ottodestruct.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Aug 28, 2013 at 10:17 AM, Zen Oven <<a href="mailto:zenoven@gmail.com">zenoven@gmail.com</a>> wrote:<br>

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