[wp-hackers] Plugin Language Translation

Alex Günsche ag.ml2007 at zirona.com
Sun Mar 25 13:08:42 GMT 2007


On Sun, 2007-03-25 at 13:41 +0100, Andy Staines wrote:
> >> Absolutely. Thanks for taking a look. I have zipped them up and they are at:
> >> Download mo-po <http://www.yellowswordfish/downloads/French-mo-po-files.zip>

Ok, the problem is, as far as I see, that you do not provide the
textdomain to use to the WP function __(). For example, you have the
code

__("Forum Locked")

but when you use the textdomain "simple-forum", it should read

__("Forum Locked", "simple-forum")

You mentioned that some words actually were translated, I assume they
are words that are contained in the global language file (e.g. "Posts").

By the way, in your beta, the filename is simple-forum-FR_fr.mo, while
it should read simple-forum-fr_FR.mo as this is the correct and usual
locale token. And, you should use the API hook "init" for loading the
textdomain, because this ensures that multilinguality plugins such as
Polyglot will choose the correct language.

HTH

Regards,
Alex

-- 
Alex Günsche, Zirona OpenSource-Consulting
work: http://www.zirona.com/ | leisure: http://www.roggenrohl.net
PubKey for this address: http://www.zirona.com/misc/ag.ml2007.asc



More information about the wp-hackers mailing list