[wp-hackers] Actions dependent on locale cannot be loaded in a
wordpress at dd32.id.au
Wed Apr 2 00:36:05 GMT 2008
If hooks are being run with translated names, It seems pretty stupid IMHO.
However, If you want to make sure the textdomain has been loaded at the
time, Try adding your actions on the init hook, I think that runs after
the translatable stuff has been loaded and setup.
On Wed, 02 Apr 2008 11:23:30 +1100, Henrik Melin <henrikmelin at yahoo.com>
> I've run into a problem when updating one of my plugins (More Fields).
> The action:
> add_action('load-' . sanitize_title(__('Settings')) . '_more-fields',
> changes depending on the locale, i.e. the translation of 'settings', but
> when the plugin is loaded and the action is added, __('Settings') does
> get translated, but remains 'Settings' and so I'm calling an action
> which does not exist.
> I understand from http://trac.wordpress.org/ticket/4563 that this was
> possible back in 2.2. Has the point at which the locale is loaded
> How can I access locale-dependent actions in my plugin?
> Any thoughts appreciated,
> You rock. That's why Blockbuster's offering you one month of Blockbuster
> Total Access, No Cost.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers