How to override default WordPress core language file

Correcting the answer given by Max. To use this approach, the filter you need is gettext_with_context because your string is translated via _x() not __(). Note that the filtered argument passed is the translation, so you should check the source string ($text and $context) to ensure you’re filtering the correct item. add_filter( ‘gettext_with_context’, ‘added_translation’, 20, … Read more

Multisite: How can I have the admin bar (toolbar) use the language of the user instead of the language of the sub-site being viewed?

Until there is a fix for it in WordPress Core you can use this ‘dirty’ way: Switch to user locale before admin bar items are processed: add_filter( ‘admin_bar_menu’, ‘ws390690_admin_bar_in_user_locale’, 10, 1 ); function ws390690_admin_bar_in_user_locale($wp_admin_bar){ switch_to_locale( get_user_locale() ); return $wp_admin_bar; } Switch back to site locale after admin bar has been rendered: add_filter( ‘wp_after_admin_bar_render’, ‘ws390690_admin_bar_in_user_locale_back’, 10, … Read more

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