When you use _e
your echoing the translated string. But you already have an echo
so just use __(
.
This is the correct code for your example
echo '<h1>' . __('September', 'simultan') . ' ' . $day . '</h1>';
If you want to add variables in your translations you should use sprintf
like this:
$date = sprintf ( __('%s %d', 'simultan'), $month, $day );
echo '<h1>' . $date . '</h1>';
You might want to also have a look at date_i18n function since you are translating dates.
Reference:
Related Posts:
- Make theme translatable for WPML
- WPML Translated Term
- Should I include colon in my msgid in PO file?
- English version of my site show french strings [closed]
- Translate arguments of a user added custom code [closed]
- WPML icl_register_string() throws fatal error but works [closed]
- Internationalize plugin so strings can be translated in WPML [closed]
- Making WP theme / plugin multii-lingual without plugins
- Translate string inside twig template
- Does WPML translate numbers automatically, or do I have to do the string translation? [closed]
- WPML & Events Manager translatable fields after duplication
- How to find posts that are missing translation? (wpml)
- Handling gettext / string translation when WP is installed in subfolder
- Override default WordPress core translation
- Different Language for Frontend vs Backend
- Open Source replacement for WPML? [closed]
- How to get a translated string from a language other than the current one?
- Custom strings for translation using Polylang plugin
- How to get a localized version of WordPress from a repository?
- Working with l10n contexts (_x etc)
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- gettext does not translate when called in ajax
- How to debug failed load_theme_textdomain()?
- How to escape the single quote character in i18n translation strings?
- How do translated, escaped strings (esc_attr) in Themes work?
- Changing the language of a single page
- what’s different between _x() and _()
- How to handle text with function __(?
- Obtain a list of available translations
- How do I translate: “2 hours and 15 minutes”?
- Disabling Translation Update
- Gettext details
- custom theme: english .mo file not working
- Unknown language json files
- How to save a translation of a plugin in “CodeStyling Localization”?
- How to escape single and plural i18n text strings?
- Best pratice to make taxonomy terms translatable without changing slugs?
- Set language per post
- List of Default Translated Phrases
- What are the most used WordPress localization?
- How to add extra language packs to WordPress
- load_plugin_textdomain in `plugins_loaded` or `init`?
- Difference between 2 internationalization (i18n) functions __() & _e()
- How to extract translatable (double underscores and _e) strings?
- How to Translate Contact Form 7 using qTranslate? [closed]
- How to set locale in ajax requests?
- Translate Navigation Menu & Sidebar Widget Titles
- Localization works but still get “This plugin is not properly prepared for localization” msg in directory
- Translate content, not instance, per-post
- Why should I escape translatable strings? and how shall i do that?
- How to load theme textdomain from plugin?
- How to handle single quote in a translatable string in WordPress
- get_the_date() for translating date format
- Translation of plugin in MU-PLUGINS directory not working
- How can I make “Leave a comment” translation ready?
- Custom translation of Month names
- Should i use _n for pronouns in translation?
- I can’t translate text in my plugin using a .mo file, load_plugin_textdomain() function is always false
- Multiple text-domains per single plugin – admin and frontend
- How to add translation for a string
- How to translate a WordPress.org plugin?
- Where the WordPress Core Translation is “actually” taking place?
- New plugin translation does not work
- Do i have make the content() also translation ready in theme?
- POEdit with Custom mu-plugins code
- Transfer from English page to Arabic page
- Make changes to translation?
- Gutenberg not all editor text translated
- How does WordPress choose which translation file to use?
- How to translate theme name
- How to get menu strings, categories and tags into po file for translation
- How to save a translation of a plugin in “CodeStyling Localization”?
- Compile errors during translation compile
- Using polylang, how can I see which post is the “original” and which are the “translated children”? [closed]
- Use WordPress default text domain for translating labels
- Is this a correct usage of esc_html_e?
- Proper way to create / manage gettext (.po, .pot) files?
- Where is the right .mo file inside the language repository?
- setlocale for date
- Fetch ID’s associated with a custom post type when translated with WPML?
- where to set the PO file for a plugin?
- How to translate functions like get_the_date()?
- translating wordpress with poedit
- Replacing strings within posts with the translatable string
- Change / tweak existing wordpress translations
- Theme localization in WPML – .mo file error [closed]
- How to display get_post_type() translated?
- Replace text string on individual page
- Change template copy with po/mo files
- loco translate plugin edits file in plugin folder
- Implementing conditional gettext translation
- How to add LTR to a custom theme which in RTL by default
- How to syntax Json output for translation?
- Translating a word with locotranslate, but wordpress does display another by default
- Default string not appearing want to translate
- Translating publish dates to Arabic
- _e() function get text_string from function
- Updating WordPress Theme/Plugin POT file without losing line numbers consistency