_n() Single and Plural for search results?
Instead of using ‘if’ loop it’s better to use special function: <?php echo _n( ‘article’, ‘articles’, $count, ‘my-plugin-domain’ ); ?> http://codex.wordpress.org/Function_Reference/_n
Instead of using ‘if’ loop it’s better to use special function: <?php echo _n( ‘article’, ‘articles’, $count, ‘my-plugin-domain’ ); ?> http://codex.wordpress.org/Function_Reference/_n
Possible solution to get everything translatable as one sting. <?php printf(__(‘Click <a href=”https://wordpress.stackexchange.com/questions/135866/%s”>Here</a> to go and wacth the video.’, ‘pietergoosen’), esc_url( get_permalink() )); ?> It is usually safe to assume that the translator have enough knowledge of HTML to understand what is going on there.
There are two options: Replace all default strings for the comment form. Look at wp-includes/comment-template.php for available filters (there are many). Set your blog’s default language to English, install the plugin WP Native Dashboard, load the Italian language files and set the admin language to Italian. Here is a screen shot of the plugin settings:
Changing wp admin user’s language does not update all of the plugin localizations in backend [duplicate]
You are completely loading your language file wrong in your plugin, and your file naming is also wrong. load_theme_textdomain(‘my_plugin’, plugin_dir_path( __FILE__ ) . ‘/languages’); should be load_plugin_textdomain(‘my_plugin’, false, dirname(plugin_basename(__FILE__)) . ‘/lang/’); Also, your mo and po files should be named my_plugin-en_US.mo and my_plugin-en_US.po. Go have a look at this tutorial also, this will help you … Read more
You don’t need to change any code. get_the_date without an argument will use the date_format option in your WordPress settings. The option F j, Y will substitute F as “September”, but if you have a translation of “September” it will be used. Comments have suggested the use of date_i18n. This is used automatically when you … Read more
WordPress Localization and Templating
In my opinion you are focusing on a wrong issue in this case. For instance, if I want to change the Read More message I have to browse all files to see if it is there. This doesn’t indicate localization problem. This indicates templating problem. What if you want to change markup of Read More … Read more
You should analyze the path of the language file, is it correct? Helpful plugins for this job: Debug Objects debug-mo-translations You should check the function to get the path. The function get_template_directory get the path to the parent theme, not a child theme. If you will use your translation file of an child theme, then … Read more
I have no words 🤦♂️ A simple change dirname(plugin_basename(__FILE__)) . ‘/languages/’ inside wp_set_script_translations() function (3rd argument) to plugin_dir_path(__FILE__) . ‘languages/’ fixed the problem