Closed artouiros closed 8 years ago
This problem is solved by creating additional links like http://example.com/[langcode]/go-to-external-site-321 for each language: http://qtranslate-x.com/support/index.php?topic=362
I think #1 is a good enough solution.Yes, it is annoying, but how many pretty links do you make? I would think it is rather occasional, is not it? If you create them programmatically, then it is not a problem to also add links per all languages.
If you end up doing plugin, I think the correct way would be to look into the code of Pretty Links and see how to redirect language-encoded url to the same target too. I would think that language-encoded URLs for the same pretty links should be allowable on a multilingual site. Users may even try to type them in manually thinking that they will get a different language there.
I hope plugin Pretty Links has some filters to make it possible to automate forwarding language-encoded URLs. It should be done there, not in qtx. For example you may get a language-neutral url, before passing it yo Pretty Link code, whatever it is. Or, if they do it via rewrite rules, then during the saving a pretty link, you may add rules for each language too. Anyway this integration plugin should work with Pretty Link's code.
Besides, some people may wish to redirect language-encoded urls to different external URLs, if that target site is multilingual too, so making links for each language is the most general way. You may think about how to make it easier, for example using LSB? This can be probably achieved with .json file: https://qtranslatexteam.wordpress.com/integration/ and then some manipulation of saving values are needed anyway at Pretty Link's side.
We do not have resources to work on such integration plugin. The relevant ideas, which we can provide, are already listed here. If you end up writing this plugin, please, follow the naming convention.
Thanks a lot for sharing the ideas with us, and good luck to you with your further development!
Hello, I am using Pretty Links Lite plugin and qtranslate-x. Let's say I made a link http://example.com/go-to-external-site-321 I have language redirect enabled in qtranslate-x and when trying to access http://example.com/go-to-external-site-321 it redirects to http://example.com/[langcode]/go-to-external-site-321 and gives 404 error because there is no page go-to-external-site-321 under [langcode]. Is is any way to support Pretty Links Lite plugin?
This is what I tried:
btw this is a very bad try, but it was frist that came to my head.