Load custom translation in custom plugin fails

I think Jacob has probably solved your problem in the comments. However, to your question: How to debug further this issue? I would hook into the load_textdomain_mofile filter and check the fully built file paths WordPress is actually trying to read: Example: <?php function debug_missing_mofile( $mofile, $domain ){ if( ‘ausg’ === $domain && ! is_readable($mofile) … Read more

How to get dashboard langauge not the website language?

get_locale() and get_user_locale() are functions to retrieve the locale that is already set. To change it, you want to “filter” the locale value. For that, you want to use the locale filter hook. The following should do it: add_filter( ‘locale’, ‘custom_locale’ ); function custom_locale( $locale ) { $locale = ( is_admin() ) ? “en_US” : … Read more

How connect my plugin translation to my page

And what to do next? I guess it should be linked somewhere. The plugin loads your language itself, so you don’t need to do anything. However, it must be named correctly. I added my translated .po and .mo to language file. Where and what are they named? For Slovak your MO file must be named … Read more

Translate are not working for standard admin

The only instance of “Count” I can see in the default domain’s admin file has a context value of “Number/count of items”. So your code should be: add_action( ‘admin_init’, ‘action_admin_init’ ); function action_admin_init() { _ex( ‘Count’, ‘Number/count of items’ ); } Ref: _ex.

Can’t translate child theme

Ok, found on a blog this solution, paste in functions.php of your child theme : function child_theme_slug_setup() { load_child_theme_textdomain( ‘parent-theme-domain’, get_stylesheet_directory() . ‘/languages’ ); } add_action( ‘after_setup_theme’, ‘child_theme_slug_setup’ );

How to do translations in WordPress?

I’d recommend you using Loco Translate plugin to create a translation. If you are creating a theme, you should specify the Text Domain and Domain Path in your style.css file. /* Theme Name: My Theme Name Author: My Name Author URI: http://sample.url Description: Your theme description Version: 1.0.0 Text Domain: mydomain Domain Path: /lang */ … Read more

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