[wp-hackers] Plugin Language Translation
Andy Staines
andy at yellowswordfish.com
Sun Mar 25 13:17:48 GMT 2007
Alex Günsche wrote:
> 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
>
>
A million thanks Alex
There is conflicting advice on the codex regarding the __() format. One
said you required the text domain the other did not include it and I
thought the one without was the more recent article so I used that. I
will add that in... 419 times! and also do the other tasks you have
given me.
I am very grateful for this help. I will inform the young lady in France
she can finish the task!
Regards
Andy
More information about the wp-hackers
mailing list