How to change text depending on the country

There are several plugins out there that help you to translate your site content. Though you could have googled that by yourself easily, look here to get a brief overview: https://premium.wpmudev.org/blog/top-6-translation-plugins-for-your-wordpress-site/ WPML is a very powerful translation plugin (not free), in your case qTranslate should be good enough and is easier to implement than WPML … Read more

How to create some sort of word mapping?

You just need to set your words in a WordPress translation tag in your theme: <?php _e(‘Goedemorgen’,’yourthemename’);?> And with the WPML string translation tool you can scan for these strings and give the appropriate translation. That’s how I do it with the paying WPML plugin. Works like a breeze. No need to make your own … Read more

Why is setlocale() returning false on WPEngine?

The issue with setlocale() is not the function itself. It is that WPEngine only has English language locales installed (the complete list is below) and cannot realistically install any other locales. Because I needed to just print some Spanish language dates (not change the entire WordPress installation to Spanish), I wound up creating an array … Read more

Hack nav menu to add gettext() to menu items?

Retrieved menu items pass through wp_get_nav_menu_items filter, as well as few others in wp_get_nav_menu_items() and around. — EDIT – This is what I used: function translate_menu( $items, $menu, $args ) { foreach ( $items as $key => $item ) { $items[$key]->title = _($items[$key]->title); } return $items; }