Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance docs to explain about English labels #89

Open
johnbillion opened this issue Nov 1, 2017 · 3 comments
Open

Enhance docs to explain about English labels #89

johnbillion opened this issue Nov 1, 2017 · 3 comments

Comments

@johnbillion
Copy link
Owner

The documentation around the English language labels and how to provide translations is not clear. Needs a wiki page or something adding to the readme.

@huubl
Copy link

huubl commented Jul 27, 2021

When modifying a build-in post type like page all the labels fallback to English. I found your comment below from 2018. So the only way is to add all the labels to register_extended_post_type()? Or are there other ways now?

#66 (comment)

You need to provide and translate the complete labels array in full, just as you would when you register a post type with WordPress' built-in register_post_type() function. Unfortunately there's nothing that Extended CPTs can do about this. The automatic label generation only works for English labels.

@johnbillion
Copy link
Owner Author

johnbillion commented Jul 27, 2021

Yes that's correct. You could probably call get_post_type_labels( get_post_type_object( 'post' ) ) to get that list of labels so you don't need to redeclare them all.

(Extended CPTs was never originally designed for overriding existing post types, it's just something that does work.)

@huubl
Copy link

huubl commented Jul 29, 2021

Thank you! Unfortunately get_post_type_labels( get_post_type_object( 'post' ) ) returns the English labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants