hybrid
hybrid copied to clipboard
Multilanguage WP Site
HI, I need to create a multilanguage site using Polylang. Polylang create master categories for the respective languages, adding a /lang/ to the URL. For example: http://mysite.org/en/myarticle/ for the english http://mysite.org/es/myarticle/ for the spanish .... and so on...
but PolyLang can be set up to not change the url if necessary.
But now, how to select the correct articles/Posts according to the language in the WPHC?
Note that the articles was not auto translated in WP, so there are different articles, depending on the language selected. Some articles write in english doesn't exist in spanish or french because there are no sense translate them, and viceversa.
any idea how to do it?
WPHC sends the language of the user at every request. What you could do is customize the WP-API to return the right translated content. Please ask the question in https://wordpress.org/support/topic-tag/rest-api/
When you have an answer, please share I am interested to know about it :)