Back to Community

How to Translate Theme Text Strings in WordPress (Including 'Read More')

15 threads Sep 11, 2025 ThemeAstra

Content

Many WordPress users want to translate theme text like "Read More" links or comment form labels into their native language. This is a common request for themes like Astra, as the sample threads show users asking to change "Read More" to Danish ("Læs mere") and modify comment form success messages.

Why This Happens

WordPress themes often come with hard-coded text strings in English. While many popular themes include translation files (.po/.mo) for multiple languages, your specific language might not be fully supported, or you might want to change a specific phrase without creating a full translation.

Common Solutions

1. Use a Translation Plugin (Recommended)

The most straightforward method is using a dedicated translation plugin. These plugins provide a user-friendly interface for finding and replacing text strings throughout your theme.

Popular options include:

  • Loco Translate
  • WPML (for multilingual sites)
  • Polylang

These plugins typically work by scanning your theme for all translatable strings and allowing you to create custom translations without editing theme files directly.

2. Use a Child Theme and the gettext Filter

For more technical users, adding custom code to a child theme's functions.php file provides precise control over translations.

Here's a basic example that changes "Read More" to "Læs mere":

function custom_theme_translations( $translated_text, $text, $domain ) {
    if ( $domain === 'astra' ) {
        switch ( $translated_text ) {
            case 'Read More' :
                $translated_text = __( 'Læs mere', 'astra' );
                break;
            // Add more cases for other strings you want to translate
        }
    }
    return $translated_text;
}
add_filter( 'gettext', 'custom_theme_translations', 20, 3 );

Important: Always use a child theme when modifying theme functions to prevent your changes from being overwritten during theme updates.

3. Check Theme Translation Files

Some themes include partial translation files. Check if your theme has existing translations for your language by looking in the /languages/ folder of the theme. If translation files exist but are incomplete, you can edit them using software like Poedit.

Things to Consider

  • Translation plugins are generally the safest and easiest method for most users
  • Custom code solutions require maintenance and may need updates when the theme changes
  • Some text strings might be coming from plugins (like comment forms) rather than the theme itself

If you encounter issues with a specific translation, try isolating whether the text comes from your theme, a plugin, or WordPress core, as each may require a slightly different approach.

Related Support Threads Support