Skip to content

Consider the ideal approach for text localization #776

@t-hamano

Description

@t-hamano

When you save changes, if you check "Localize Text", the template content will be saved as a pattern and translation functions (esc_html_e()) will be applied to some of the text:

Image

The text that gets replaced is determined by a hard-coded list of regular expressions and blocks.

As a result, there have been reported issues with anything that doesn't fit these not being localized:

Maintaining this hard-coded data is impractical.

Perhaps a more generic approach is needed, although this has probably been considered in the past.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions