polylang documentation says that it allows you to choose different subdomains/domains per language: https://polylang.pro/doc/url-modifications/#subdomains-name-and-domains (section 4).
maybe this would be the easiest way?
but i do also have a project, which is currently in development, where polylang and this plugin are used together. here you can see the polylang-settings: http://pasteboard.co/RbjNU4P0Y.png, and here my mapping: http://pasteboard.co/Rblr2MUo4.png
this works fine for german pages as well as for english pages.
hope this helps,
Sorry, for the late response. I was search for a completely different solution.
Interesting, my settings are similar. The german content (default language) is working, but the second and third isn’t. The /LANG/ section in the url is stripped.
When typing this URL into the browser, I get the following error: ERR_TOO_MANY_REDIRECTS
- This reply was modified 5 years, 2 months ago by marcwieland95.
By the way. My problem is that the page runs on 4 different domains and all of them are also multilingual. So it’s a mix between your plugin and polylang.
it is getting complicated now – could you post your domains and screenshots of polylang and domain-mapping settings?
Today I decided to solve it with another CMS. WordPress doesn’t handle this case well. But it would be interesting to see it work. You’re solution is very interesting. A multisite setup is no alternative – it’s crap.
Here are the screenshots:
i guess your second mapping is the problem. you are generating an infinite loop when mapping a domain to itself. you shall only place the additional domains in these settings.
and i can not find the /news or /en/new-en slugs in the mappings. don’t you want them to be mapped?
You’re right with the base domain. The last role is not needed. However when removing these, there’s no difference.
Polylang is screwing something up. The default language works, but on all translated pages the site runs into a redirect loop.
All right. I figured out the issue.
I’ve defined those two const inside the wp-config:
define('WP_HOME','http://' . $_SERVER['HTTP_HOST'] ); define('WP_SITEURL','http://' . $_SERVER['HTTP_HOST'] . '/wp');
Those collided. Interestingly only on the translated pages.
ok, please let it removed. and it was the second mapping according to your screenshot, you are talking about “the last role”?
i do not understand what exactly you want with the languages. you have no mappings defined for the language-slugs as far as i can see in your screenshots.
ah, i was too fast for your second response 😉
i guess that polylang noticed the /wp as a language that does not exist…
thanks for pointing out and good luck with your project. i am happy about a positive review 😉
Haha. Yes, it’s a little slow.
Thanks, for your support. Jep, I’ll write an review.
One more question:
Is it possible to access a single cpt entry on all domains? For example a custom post type called “Hello World” should be accessible under DOMAIN.X/news/hello-world and DOMAIN.Y/news/hello-world.
as one post is always accessible under one permalink, this is not possible out of the box. of course you could work with redirections here, if it is necessary only to look good when you print the url somewhere or things like that.
- The topic ‘Multilingual’ is closed to new replies.