[wp-polyglots] searching a tutorial on translating a WP theme
Arne Brasseur
arne at arnebrasseur.net
Thu Sep 21 10:06:11 GMT 2006
Lukáš Kucharczyk schreef:
> Thanks a lot for explanation. One last question: What's that with the
> 'textdomain_if_apply' thing?
The _() and e() functions can take one or two arguments. The first one
is the text to be translated, the second one is the 'domain'.
Translations for Wordpress itself use the default domain, plugins and
themes should use their own domain to keep things seperate. If your
theme is called 'sometheme' then the function calls will look like this:
_e('...sometext...', 'sometheme')
This way different themes/plugins can have their own translation of a
certain string, which prevents possible name clashes. If you follow this
pattern you can just drop your mo file in the plugin/theme directory. If
I'm not mistaken it should be named themename_locale.mo.
Good luck translating!
Arne
>
> Thanks for help
>
> Regards, Lukas
--
Arne Brasseur @ your service
http://www.arnebrasseur.net
arne at arnebrasseur.net
+32/496/94.55.63
More information about the wp-polyglots
mailing list