Skip to content

Support translations #94

Open
Open
@bartkleinreesink

Description

@bartkleinreesink

I like the package, but it lacks one very important feature for me to start using it: translation support.

I am not a native English speaker and my clients mostly aren't, either. So when I create a website, I want to make it at least bilingual.

Of course, I could extend the classes and move my way around the current limitations, but that is very cumbersome if it needs to be done for every project.

The biggest problem is that there is no check if the init hook has been fired already. My suggestion would be to call did_action('init'). If true, call the methods directly, otherwise, register them to the init hook.

This is a problem because I'm not able to choose when the post type is registered in the hook chain. So when I have translated strings in the declaration of the post type, they are not available at the time when the post type gets registered, because they are loaded too early. I want to decorate the class after the init hook has been fired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions