Many times I’m asked to check or manage WordPress blogs in a foreign language, like German or Spanish. Not knowing those languages, it’s very hard to find the options and change them inside the plugins’ administrative panels because they are translated and unreadable by me.

It would be a best practice to have and option to disable the administrative translation for a plugin, enabling a temporary switch back to the native plugin language (most of the times English). On plugins where I added the i18n code to make it ready to be translated, I usually add an option (not translatable) to disable the current translation.

hyper-cache-translation

Another situation where disabling the translation of a plugin is required, is when an option seems wrongly described: I met some translation in Italian, probably made with automatic tools, which were totally misleading and only removing the .po/.mo file I was able to understand what the plugin option meant.

Performance

Another tip is about performances: there are no reasons to load the translation of the administrative side of a plugin even when a user is simply entering the blog to read an article. Backend and frontend translations should be separated and loaded when required, not always. More, many time a translation is only required inside the specific plugin administrative panel, so it can be loaded just there and not everywhere.

For example on Hyper Cache I load the translations only in the options panel and only if not blocked by the user:

if (!isset($plugin->options['translation_disabled'])) {
 if (function_exists('load_plugin_textdomain')) {
 load_plugin_textdomain('hyper-cache', false, 'hyper-cache/languages');
 }
}

This practice should be followed by plugin and theme authors to avoid not required overloads of the server.

Similar Posts

Leave a Reply