sprintf()
can be used to break the string up so that the translatable string can be isolated from the HTML:
function new_excerpt_more( $more ) {
return sprintf( '<a href="https://wordpress.stackexchange.com/questions/206823/%1$s"><span class="readmore">%2$s</span></a>',
get_permalink( get_the_ID() ),
__( 'Read More', 'your-textdomain' )
);
}
add_filter( 'excerpt_more', 'new_excerpt_more' );
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)
- Custom theme .mo translation file not working
- Plugin translation not displaying
- 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
- How to create .pot files with POedit?
- How to make a WordPress plugin translation ready?
- How-to: Translate plural forms for themes/plugins with PoEdit
- generating po mo translating files from scratch in a wordpress theme
- custom theme: english .mo file not working
- Unknown language json files
- How to Translate Contact Form 7 using qTranslate? [closed]
- Best location for theme translation files
- Why should I escape translatable strings? and how shall i do that?
- Translation of plugin in MU-PLUGINS directory not working
- I can’t translate text in my plugin using a .mo file, load_plugin_textdomain() function is always false
- How to translate a WordPress.org plugin?
- Do i have make the content() also translation ready in theme?
- Transfer from English page to Arabic page
- How to get menu strings, categories and tags into po file for translation
- Compile errors during translation compile
- How to translate functions like get_the_date()?
- Change / tweak existing wordpress translations
- How to display get_post_type() translated?
- loco translate plugin edits file in plugin folder
- How to add LTR to a custom theme which in RTL by default
- Translating publish dates to Arabic
- Updating WordPress Theme/Plugin POT file without losing line numbers consistency
- Translation for frontend
- Can’t have a Persian website with a completely English admin panel!
- How can i merge the translations from one .po file into the source on another .po file?
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- Single translation for many locales
- Is there a way to test that readme looks in other language before submitting translation?
- Translating plugin or locale file
- Is there any way to use @wordpress/i18n for
- Language file doesn’t work
- How to prevent someone from entering strings without making it available for translation?
- How to solve a translation function issue with no arguments and missing a text-domain?
- Plugin has no US english translation file
- English version of my site show french strings [closed]
- Setting Email locale before retrieving gettext translations
- Translation is not being output in one instance
- Why translations?
- POEDIT – Continue with translations
- How do you translate comments_number function text in a theme?
- Proper way to use esc_html__ and esc_attr__ etc for escaping value for translation
- WordPress translator plugin: Google Webmaster’s Tools shows hundreds of 404 not found errors. How to clean the mess?
- Automatic translation with different domains per languages?
- Translations not working on Safari
- String translation within WordPress multisite with i18n not working on all sites
- Translate string inside twig template
- How to call wordpress API to translate a post request
- How to get dashboard langauge not the website language?
- WordPress in French Language [closed]
- How to ‘manually’ load translations/test domain outside theme context?
- How to deal with differently translated prepositions?
- WPML admin texts with serialized objects
- Locale changed but plugin still showing default language
- White Space on translated strings lost
- Theme translation file translating some strings and not translating others
- How to find posts that are missing translation? (wpml)