New home › Forums › Pro Add-on › The language is changed only automatically to English
- This topic has 1 reply, 1 voice, and was last updated 6 years ago by clikcartagena.
-
AuthorPosts
-
September 8, 2017 at 11:46 am #30328clikcartagenaMember
Hi.
This is the second time the same thing happens to me.
Before the wp-google-maps plugin appeared in Spanish, but now it appears in English. The language has been changed only automatically.
On the other hand, the addons Visitor Generated Markers, I never appeared in Spanish. But the .mo file is translated.
I have tried copying the two language files in wp-content / languages, but it does not work.
Please, I need the whole plugin and its addons to look like in Spanish.
Thank you very much.
September 11, 2017 at 6:44 pm #30407SupportTeamModeratorHi there
Thank you for getting in touch with us.
Our plugin has been translated into Spanish on WordPress.org – as a result of this, the basic version’s language files overwrite the (complete) language files that our plugin ships with.
Please login to your WordPress site, navigate to the plugin editor and go to wp-google-maps-pro/wp-google-maps-pro.php. Please add in the following code at the bottom of the file:
add_action( ‘init’, ‘wpgmza_translation_fix’ );
function wpgmza_translation_fix(){
$domain = “wp-google-maps”;
$plugin_rel_path = ‘wp-google-maps/languages/’;
$locale = apply_filters( ‘plugin_locale’, is_admin() ? get_user_locale() : get_locale(), $domain );
$mofile = ‘wp-google-maps’ . ‘-‘ . $locale . ‘.mo’;if ( false !== $plugin_rel_path ) {
$path = WP_PLUGIN_DIR . ‘/’ . trim( $plugin_rel_path, ‘/’ );
} else {
$path = WP_PLUGIN_DIR;
}load_textdomain( $domain, $path . ‘/’ . $mofile );
}The above code will ensure that the remaining strings in our plugins translate as expected.
I hope this helps?
-
AuthorPosts
- You must be logged in to reply to this topic.