Print shortcode according to site language

That’s probably basic PHP. As all that’s needed would be some kind of map/array and then switch use the id according to what get_locale() returns. <?php // Provide a map if locales and shortcode IDs. $custom_footer = [ ‘ar’ => ‘319’, ‘en_US’ => ‘3181’, // … and so on ]; // Get the current language. … Read more

Language file doesn’t work (poeedit)

According to docs, load_theme_textdomain() function should generally be called from within the after_setup_theme action hook. add_action( ‘after_setup_theme’, ‘my_theme_setup’ ); function my_theme_setup(){ load_theme_textdomain( ‘apress’, get_template_directory() . ‘/languages’ ); }

Getting Turkish alphabet characters in the URL field in webbrowser

The function [sanitize_title()][1] generates slugs. This function makes a subsequent call to remove_accents(). This function is found in /wp-includes/formatting.php and includes a map of all character conversions (just FYI). This only occurs in the “save” context of sanitize_title() which is the default. Removing accents is not necessary, but it helps ensure the posts slug only … Read more

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

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