Is there any way to evaluate the language a post/page is written in? I am building a multilingual site and am almost pulling my hair out trying to get the front-end navigation to take the chosen language into account. So far the polylang plugin http://wordpress.org/extend/plugins/polylang/ has worked fine for everything else.
Leave a Reply
You must be logged in to post a comment.
The main language of a post should be saved in a post meta field. There is no way to detect that automatically. Even Googleâs heuristics fail regularly with that.
So add a custom field
lang
and check with â¦â¦ what language the post was written in.
Update
Here is a very simple example for a language selector. It will be visible on every post type with a Publish metabox.
⦠will return the postâs language if available.
For the rest api, wp-graphql and wp-cli’s
wp eval-file
I needed to do