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

Loading Canvas & WooCommerce translation file in child theme

There was a syntax error in loading the WooCommerce translations and I managed to get the parent theme translations working by following the same method I used for the WooCommerce translations. function weg_localisation() { unload_textdomain( ‘woothemes’ ); load_textdomain(‘woothemes’, get_stylesheet_directory() . ‘/lang/af_AF.mo’); unload_textdomain(‘woocommerce’); load_textdomain(‘woocommerce’, get_stylesheet_directory() . ‘/woocommerce/i18n/languages/woocommerce-af_AF.mo’); } add_action(‘init’, ‘weg_localisation’);

How to use esc_attr__() function properly to translate a variable that contains string?

If you have static text with dynamic content then you can use. printf( esc_attr___(‘static text goes here with %s’, ‘text-domain’ ), $title ); If you have only $title then no need to translate it. Just escape it. echo esc_attr( $title ); Note esc_attr, esc_attr__ and esc_attr_e used for escaping dynamic values from HTML element attributes. … Read more

Tool bar in editor missing in WP

I’m guessing you mean the WordPress Admin bar which shows in the header of the logged in user page? Can you get the user to login and check that they haven’t disabled this under the User > My Profile menu option Also you might like to check out this plugin which allows you to switch … 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