How to translate WP Blog (search, category etc.)?

If you have bought a theme you should have support for other languages. See the chapter Internationalization in the theme developer handbook for more information, or e.g. more specific on translation functions like __() the Code Reference. If you independently developed a theme, you probably forgot about this element. If not, check if your theme … Read more

“ Language notation in the post content

This is the notation of the (pretty old) Plugin qtranslate. It was abandoned way back and replaced by mqtranslate and later qtranslate-x, which at this point are also abandoned. You can however convert your content to be used with wp multilang, which works with gutenberg, by replacing the <!–:lang–> tags with kinda shortcodes [:lang]. So … Read more

Get Text Domain For Transalation

No, there isn’t. The text domain needs to be hard coded, otherwise it can’t be read by localization tools which parse the code without executing it. See this note from the Internationalization documentation The text domain should be passed as a string to the localization functions instead of a variable. It allows parsing tools to … Read more

Is hint for translator compulsory while internationalizing a string containing variables?

The notes to translators aren’t required, as far as I can tell, but they will definitely help anyone out who’s trying to translate your plugin. You might want to think of them as best practices rather than requirements. As to your second question: Since WordPress 4.6 translations now take translate.wordpress.org as priority and so plugins … Read more

Plugin language always shows WP site language, not profile language

I found the solution: In the constructor I had to add this public function __construct() { // your code goes here add_action( ‘plugins_loaded’, [$this, ‘load_text_domain’] ); // your code goes here } public function load_text_domain() : void { load_plugin_textdomain(‘your-plugin-textdomain’); } This finally made sure that the language displayed followed the settings of the user profile … Read more

Translation is not being output in one instance

Your first line of code looks ok, are you sure you have a translation for the ‘Featured’ string in your PO file? Your second issue is an excellent example of how you should not use the gettext functions. You are trying to translate dynamic string ‘<a class=”more-link” href=”‘. get_permalink($post->ID) . ‘”>Read More</a>’ for which you … Read more

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