[wp-hackers] Couple of quick questions: restrict access to plugin file and loading of l10n

Stephen Rider wp-hackers at striderweb.com
Fri Oct 19 17:58:53 GMT 2007


On Oct 19, 2007, at 12:40 PM, Andrew Ozz wrote:

> 2. I'm providing .pot file for easy translation and (of course)  
> using load_plugin_textdomain to load the translations.
>
> How "late" can I call it? I see some plugins use the "init" or  
> "plugins_loaded" hooks but that would load the translation on every  
> run - another 25-30KB - whether it's needed or not.
>
> I've tried loading it at the beginning of the plugin's options page 
> [...]

I just wanted to say that that's a really excellent question.  I use  
translation files myself, and never even thought to limit beyond the  
plugin loading (which happens on every page).  The translations are  
only needed on certain admin screens!

Whatever the reply is, this should get a mention in the codex....

Stephen


More information about the wp-hackers mailing list