Translating plugin or locale file

Lots of plugins exist for human translation (as distinct from automatic machine translation). Here’s a blog post that lists and compares some of the best ones: http://www.wpmayor.com/plugin-reviews/best-wordpress-translation-plugins/ In my personal experience, WordPress Multilingual seems to be the most solid one for a long-term commitment: http://wpml.org. They have a few different price options (including free for … Read more

Translate theme only

I got back to this issue today and I solved it like a boss thanks to the Zanto plugin. Just to recap, I was trying to translate the front-end of only one site from a multisite setup with the least possible hassle while leaving every other site unchanged. All I did was copy the general … Read more

How to translate get_intermediate_image_sizes?

You can use __(), _e(), _x() or _ex() and your textdomain to make your theme or plugin translatable. I stripped your code snippet to the basics, so you will get the idea more easily: <select class=”widefat”> <?php foreach ( $this->getImageSizes() as $name => $atts ) : ?> <option value=”<?php echo $name; ?>” ?>> <?php echo … Read more

Load plugins’.mo and .po files from a directory

This is, in fact, already available by default. If specific locale isn’t available in plugin’s folder WordPress will try to fallback to languages directory. It is defined by WP_LANG_DIR constant and for plugins the default location would be wp-content/languages/plugins. Note that name is expected to follow the specific format: name-locale.mo.