Ah ha! I found the answer, and it’s a really weird one.
It just so happens that the particular strings I was trying to translate were the labels of required form fields, and looked like this:
<?php echo '<label>' . __( 'Email *', 'cdashmm' ) . '</label>' ?>
If I move the asterisk outside the string, like this:
<?php echo '<label>' . __( 'Email', 'cdashmm' ) . ' *</label>' ?>
then the translation works.
So I have solved the problem… but that does raise another question – why do asterisks inside strings make them untranslatable?
Related Posts:
- How to get a translated string from a language other than the current one?
- How to get a localized version of WordPress from a repository?
- Working with l10n contexts (_x etc)
- How to escape the single quote character in i18n translation strings?
- How to escape single and plural i18n text strings?
- What are the most used WordPress localization?
- Difference between 2 internationalization (i18n) functions __() & _e()
- Localization works but still get “This plugin is not properly prepared for localization” msg in directory
- How to load theme textdomain from plugin?
- get_the_date() for translating date format
- Should i use _n for pronouns in translation?
- POEdit with Custom mu-plugins code
- How does WordPress choose which translation file to use?
- Proper way to create / manage gettext (.po, .pot) files?
- Should I include colon in my msgid in PO file?
- _e() function get text_string from function
- Translations not returning translated strings
- Force translated language on front
- Translating dynamic strings
- WordPress translation loading english file
- Easy export/import of data for Translation
- WordPress Theme .mo-file won’t load
- How to become a translator on wordpress.org?
- Translation from .mo file not working in theme
- Localization, escape html elements mid-sentence
- WordPress localization – gettext and git
- Can I set WordPress to display languages based on system language without a plugin?
- /languages/ folder missing in default themes
- How to translate functions.php?
- WordPress Translations
- Post types translation
- Translate arguments of a user added custom code [closed]
- Internationalize plugin so strings can be translated in WPML [closed]
- localization of theme and plugins to English (originally in another language)
- Interface translation without plugins
- Plugin localization persistance (woocommerce)
- WordPress Localization error within return value
- Custom theme .mo translation file not working
- WordPress translation
- Tweak the loop for translation
- Translating form labels shortcode output
- Website Language/Locale Switching
- .po file is loaded but changes are not appearing
- Theme localization of “slugs” (custom post types, taxonomies)
- gettext does not translate when called in ajax
- Changing the language of a single page
- what’s different between _x() and _()
- Obtain a list of available translations
- How to add extra language packs to WordPress
- load_plugin_textdomain in `plugins_loaded` or `init`?
- Translate Navigation Menu & Sidebar Widget Titles
- How to handle single quote in a translatable string in WordPress
- WordPress: After Gutenberg plugin migration to block.json the localization/ translations with PolyGlot in JavaScript does not work anymore
- How can I make “Leave a comment” translation ready?
- Multiple text-domains per single plugin – admin and frontend
- Where the WordPress Core Translation is “actually” taking place?
- The effect of x() family of functions
- How to translate theme name
- Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]
- Making my plugin translation ready. Poedit not working
- Where is the right .mo file inside the language repository?
- setlocale for date
- where to set the PO file for a plugin?
- Internationalization and functions that use it
- Replace text string on individual page
- How to syntax Json output for translation?
- Translating a word with locotranslate, but wordpress does display another by default
- Two text domains in one plugin
- Generate JSON files for language translation from po file without wp-cli i18n make-json
- How do I translate month names in post metadata?
- Translate theme only
- what’s different between _x() and _()
- How can I see my theme’s text domain?
- Making a string translation ready with html in it
- Translation for plugin
- Translate custom order status through a filter?
- Translation with wordpress what does the process involve?
- Is hint for translator compulsory while internationalizing a string containing variables?
- How to translate custom Divi module using POEDIT and Polylang [closed]
- Can the qTranslateX-Plugin translate non-article text? [closed]
- Programmatically choose language for translation
- Translate a theme with a PO file
- How to define theme translation file?
- WordPress Translation to french, at -> à not working
- String translation for esc_html__() when registering string [closed]
- how to unlocalize theme/plugin?
- __() function inside html tags
- How to do translations in WordPress?
- Qtranslate-X get raw post title value
- Menu names not getting translated
- Translation not working for Constant strings in Plugin
- qtranslate loading the wrong language
- issue in translating a wordpress them
- Understanding WordPress Default Theme – twentyfifteen.1.4 >> Languages Folder
- Language & translation
- How to translate placeholder?
- Display Today’s date outside the loop?
- Poedit ASCII errors ( WordPress )
- Does WPML translate numbers automatically, or do I have to do the string translation? [closed]
- Translations in source code