Locale changed but plugin still showing default language

Thanks @toscho — The problem plugin in particular is wp-pagenavi. The backend strings are being translated, however; the frontend remains in default en_US locale. I found this: https://wordpress.org/support/topic/translation-91 To be more specific, the text field values on plugin options page do not get translated so my assumption is that translations are malformed somewhere in the … Read more

Plugin translation not displaying

Ah ha! I found the answer, and it’s a really weird one. It just so happens that the particular strings I was trying to translate were the labels of required form fields, and looked like this: <?php echo ‘<label>’ . __( ‘Email *’, ‘cdashmm’ ) . ‘</label>’ ?> If I move the asterisk outside the … Read more

load language file

you don’t need to edit functions.php (moreover don’t edit this line or it will break the localisation of the theme, because arcade, is the code used to know where to search translations) according to the line you read in functions.php, you have to put fr_CA.mo and fr_CA.po in wp-content/themes/arcade-basic/library/languages

Warning: The actual loaded translation content contains mixed textdomains and is not pure translateable within one textdomain

If I am correct (I am not familiar with the plugin itself) it actualy means that you have/use more then one text-domain in your function(s) or theme template(s) as in (just an example): _e( ‘Your Ad here’, ‘my-text-domain’ ) / _e( ‘Your Ad here’, ‘your-text-domain’ ) You should always use one text-domain for your functions … Read more

WordPress Localization error within return value

sprintf() can be used to break the string up so that the translatable string can be isolated from the HTML: function new_excerpt_more( $more ) { return sprintf( ‘<a href=”https://wordpress.stackexchange.com/questions/206823/%1$s”><span class=”readmore”>%2$s</span></a>’, get_permalink( get_the_ID() ), __( ‘Read More’, ‘your-textdomain’ ) ); } add_filter( ‘excerpt_more’, ‘new_excerpt_more’ );

Change localization only for plugin

Use plugin_locale filter: apply_filters( ‘plugin_locale’, $locale, $domain ); Change locale like this: $my_plugin_domain = ‘my_plugin_domain_name’; $override_locale=”es-ES”; add_filter(‘plugin_locale’, function ($locale, $domain) use ($my_plugin_domain, $override_locale) { if($domain == $my_plugin_domain) { $locale = $override_locale; } return $locale; }, 10, 2);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)