How to use native wordpress translation domain inside a custom plugin?

How to use native wordpress translation domain inside a custom plugin? You would use __() without a textdomain, but this won’t work for you because that’s not how post status labels work. get_post_status doesn’t return the name of the post status, it returns a slug, e.g. pending not Pending. The solution is in the user … Read more

Translating the “Everything” filter menu in Quicksand jquery file

You should be able to pass the language across using wp_localize_script(). So you’re obviously enqueuing your own custom javascript file, lets say that file is called createlist.js. I assume you’re doing it like so: wp_enqueue_script( ‘createlist’, plugins_url( ‘createlist.js’, __DIR__ ), array( ‘jquery’ ), ‘1.0’, true ); (You’ll need to adjust the path for the JS … Read more

Custom post type slug localization

First, you should have to register your custom post type with a generic, language-independent slug because the slug in register_post_type is not meant to be dynamic. and then modify rewrite rule try this snippet function register_custom_post_type_services() { $labels = array( ‘name’ => _x(‘Services’, ‘Post Type General Name’, ‘text_domain’), ‘singular_name’ => _x(‘Service’, ‘Post Type Singular Name’, … Read more

Dashboard and Site Language only partially translated (in own theme)

Finally I found the issue! The following filter was causing the theme to only translate partially: function howdy_message($translated_text, $text, $domain) { $new_message = str_replace(‘Howdy’, ‘Aloha’, $text); return $new_message; } add_filter(‘gettext’, ‘howdy_message’, 10, 3); I replaced it with the following that now works: function howdy_message($translated, $text, $domain) { if (false !== strpos($text, ‘Howdy’)) return str_replace(‘Howdy’, ‘Aloha’, … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduseduseduseduseduseduseduseduseduedus