• Hello,
    I use a Premium theme and I added some new strings in some some pages files of theme with the domain of the theme like this:
    <?php _e(‘new string’, ‘ltheme_domain’); ?>
    I can’t found the “new string” in the theme with loco Translate.

Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    If you’re not the author of the theme, it’s not recommended to modify it this way.

    By adding strings in the code, you will then have to regenerate the POT (template) if there is one. And then take all language files from that. This is really the job of the theme author.

    See “Working with Templates”:
    https://localise.biz/wordpress/plugin/manual/templates

    I recommend instead you create a child theme to override pages you want to modify. This child theme should have its own Text Domain for new strings added by you. You would then manage your own text domain separately from the parent theme. This is a more advanced topic than I can provide help with. Start here: https://developer.wordpress.org/themes/functionality/internationalization/

Viewing 1 replies (of 1 total)

The topic ‘can’t translate new string’ is closed to new replies.