Do Child-Themes automatically load the Translation from the Parent-Theme?

Is it enough to just create a child-theme – let’s say technically without adding anything else but the bare minimum style.css – to have the translation of the parent-theme being used automatically for the child-theme as well? Basically, the answer is NO, … but… there’s an option: Add a mu-plugin. This (MU-)Plugin does several things: … Read more

How can I manually upgrade translations?

quick-and-dirty hint to solve this problem: find the function list_translation_updates() in wp-admin/update-core.php $updates = wp_get_translation_updates(); if ( ! $updates ) <- locate the if … } else { <- add this print_r ( $updates ); } add the else-case and save the file reload the dashboard page and you will get the desired information.

generating po mo translating files from scratch in a wordpress theme

You can use the tool POEdit to translate your theme from scratch or update/add new strings into the .po/.mo files. Here is the tool usage tutorial: Translating_With_Poedit There is a plugin that can do the job for you: codestyling-localization STEPS: 1. Load a text domain for the theme. add_action(‘after_setup_theme’, ‘my_theme_setup’); function my_theme_setup(){ load_theme_textdomain(‘mytheme’, get_template_directory() . … Read more

How-to: Translate plural forms for themes/plugins with PoEdit

Step 1 Open your file in PoEdit. Step 2 Go to “Catalogue” ยป “Settings“ Step 3 Fill in “Language” and “Country” 1). Step 4 Fill “Pluralform” (last field). // For 2 plural forms nplurals=2; plural=n != 1; // For 3 plural forms (for e.g. russian), use: nplurals=3; plural=(n%10==1 &amp;&amp; n%100!=11) ? 0 : ((n%10&gt;=2 &amp;&amp; … Read more

How to get a localized version of WordPress from a repository?

Download your languages files from the SVN repo… I would strongly advise against this. The repo, as storage of language files, is being discontinued, in favor of Translate WordPress. Right now, you have no guarantees that the repo has a current version of the file. The current method of getting language files is either to … Read more

How to print translation supported text with HTML URL

Since esc_html_e will escape HTML link (hence will show the HTML anchor as plain text), you’ll need to segment the text and escape the non-HTML part with esc_html_e or esc_html__, and print the HTML LINK part without HTML escaping. Method-1 (just for your understanding): You may do it in parts, like this: esc_html_e( ‘Dear Guest, … Read more