[wp-hackers] Why strings aren't translated here?

Peter Westwood peter.westwood at ftwr.co.uk
Thu Oct 29 21:25:21 UTC 2009


On 29 Oct 2009, at 21:20, Milan Dinić wrote:

> I have a problem with my plugin (
> http://wordpress.org/extend/plugins/gravatar-signup- 
> encouragement/ ). Two
> strings aren't translated with gettext even though they are in po/mo  
> files.
> First one is text of message (line 71) which is made only on  
> activation
> (line 93) and later is saved in database. Second is URL to locale  
> version of
> Gravatar (line 58). In both cases untranslated strings are shown.
>
> Does anyone know what is problem with them?

You are calling the translation functions before you load you  
translation files.

You call the translation for these when the plugin is included but  
load the file on the 'init' hook which runs afterwards.

Hope that helps
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list