I am migrating a (non-English-language) blog using the Koi theme on WordPress.com to a self-hosted environment, but see that certain strings are no longer being translated. For example, if my wp-config.php file contains
define ('WPLANG', 'de_DE'), then _most of the theme is indeed translated to German, but "Leave a Comment" remains in English.
After downloading the 'koi-wpcom-1-1.zip' file from WordPress.com, and digging around in the theme's code, I have the following questions:
On one hand, the theme's code shows evidence of translation-readiness in that all strings are wrapped by the
'__()'function. For example:
__( 'Leave a Comment', 'ndesignthemes' ).
On the other hand, nowhere do I see any use of
Might that mean that parts of the theme are getting translated because the corresponding strings have already been translated for the WordPress core, but no theme-specific translations are being performed due to "missing pieces" at the theme level?
I have tried fixing/completing the translation by doing the following, but so far no success:
- Explicitly added
load_theme_textdomain( 'ndesignthemes', get_template_directory() . '/languages' );to functions.php
- Visited WordPress.com's German translation project for the Koi theme (GlotPress), and downloaded the corresponding 'wpcom-themes-koi-de.po' and 'wpcom-themes-koi-de.mo' files. Also verified that the *.po file explictly contains a translation for "Leave a comment" ("Hinterlasse einen Kommentar").
- Per my understanding, renamed the above files to 'ndesignthemes-de_DE.po' and 'ndesignthemes-de_DE.mo', and copied them into 'wp-content/languages/themes' directory.
- After the following failed to cause "Leave a comment" to get translated, tried all variations of renaming the *.mo/*.po files to 'koi-wpcom-de_DE.*', 'koi-de_DE.*', 'wpcom-themes-koi-de_DE.*', and 'de_DE.*'; and/or to copying them instead to their 'wp-content/themes/koi-wpcom/languages' theme-installation directory.
... but nothing helps.
- Explicitly added
Can anyone help me understand what is the problem and how to fix it?