Skip to content

Add support for custom translation keys #435

@michaelw85

Description

@michaelw85

Feature Request

Describe your use case and the problem you are facing

When using a custom templating engine like Laravel blade or twig it can be interesting to create your own translation function or even just a custom function in WP. I use blade and created a directive @t() the wraps __() and adds a bit more functionality like a default text domain and string interpolation. As expected, these custom keys/functions are not included in the resulting pot file.

Describe the solution you'd like

I would love to add an optional argument allowing custom keys/functions to be included in the resulting pot.
For example the -k flag available in the xgettext command.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions