Override parent theme translation on child theme

I have a parent theme that uses correctly load_theme_textdomain() to load all the translated strings in many languages. Then I created a child theme that uses load_child_theme_textdomain() to achieve the same thing for its strings. There are certain translated strings for a particular language on the parent theme that I’d like to replace/override in the … Read more

pass object/JSON to wp_localize_script

I’ve got a working piece of javascript that contains an object literal. But I need to localize it, and I’m ytrying to figure out how to rewrite it so that I can get wp_localize_script() to accet it, and output the correct format. The non-localized (non dynamic) version looks like this: var layoyt_config = { ‘header’ … Read more

Override default WordPress core translation

WordPress is set to Dutch language. When I use get_the_archive_title() my theme correctly outputs “Categorie: Category-name” on a category archive page. However I’d like that to read “Sectie: Category-name”. I do not want to change the Dutch language file in the wp-content/languages folder, because that will be updated by WordPress updates. I tried copying that … Read more

Theme localization of “slugs” (custom post types, taxonomies)

in my theme I want to define a series of custom post types and custom taxonomies, each one having its own customized slug; the base language of my theme is english, therefore the slugs will be in English language for example while defining the slug of custom post type “product” args: ‘rewrite’ => array( ‘slug’ … Read more

How to make a WordPress plugin translation ready?

What is the best way create a plugin that is translation ready? It doesn’t have to be translated from the beginning but it has to be easily translatable so fellow developers from different cultures can participate to the localization process of the plugin. 2 1. Write with localization in mind Don’t use echo or print() … Read more

What is a Theme textdomain?

I’ve found that any WordPress theme uses this functions, but I don’t understand what is the purpose of it and what is it, in this case ‘themify’? Here are some examples in Themify functions.php: 1). load_theme_textdomain( ‘themify’, TEMPLATEPATH.’/languages’ ); 2). if (function_exists(‘register_nav_menus’)) { register_nav_menus( array( ‘main-nav’ => __( ‘Main Navigation’, ‘themify’ ), ‘footer-nav’ => __( … Read more

Change the text on the Publish button

Is there a way to change the text of the publish button on a custom post type to say some different? For example, Save instead of Publish. And also remove the draft button? 7 If you look into /wp-admin/edit-form-advanced.php, you will find the meta box: add_meta_box(‘submitdiv’, __(‘Publish’), ‘post_submit_meta_box’, $post_type, ‘side’, ‘core’); Note the __(‘Publish’) – … Read more