[wp-hackers] Hooks, Actions, Filters

Will Anderson wp-hackers at itsananderson.com
Fri Jul 31 13:36:25 UTC 2009


On Fri, Jul 31, 2009 at 9:29 AM, Jeremy Visser <jeremy at visser.name> wrote:

> On Fri, 2009-07-31 at 11:37 +0000, scribu wrote:
> > You could just write
> >
> > return str_replace(__('Protected:'), '', $format);
> >
> > to account for l10n.
>
> Won't work. For starters, __('Protected:') won't get translated, as it's
> not the same as __('Protected: %s'), which is the original.
>
> If a new language that decides the translate string is something like
> __('Goo goo %s ga ga') (sorry, I don't speak anything other than
> English, so every other language sounds like googaa to me), then how is
> that going to work?
>

According to the Codex page on
I18n<http://codex.wordpress.org/I18n_for_WordPress_Developers>it
sounds like even translating __('Protected: %s') in a plugin won't
work,
because of the way the localization tool works. Those translations are tied
directly to a specific line in a specific file. So yeah, another solution is
probably needed.

-- 
Will Anderson
http://www.itsananderson.com/


More information about the wp-hackers mailing list