kaz Posted December 18, 2019 Share Posted December 18, 2019 I want to link in a page (en) to a page with a second language (de). If I choose "Page" I can only select one page of the same language. I then tried to enter the full URL, https... the page will still be linked to the same language (same page) in the frontend. How do I link to a page with another language in a multilingual website? Link to comment Share on other sites More sharing options...
dotnetic Posted December 18, 2019 Share Posted December 18, 2019 Where are you entering the URL? Do you enter it in a CKEditor field, or is it a separate Page field (InputfieldPage)? Link to comment Share on other sites More sharing options...
kaz Posted December 18, 2019 Author Share Posted December 18, 2019 Via the link function in the editor. The selections Page and URL is available, no way to connect another language page. Link to comment Share on other sites More sharing options...
Gideon So Posted December 19, 2019 Share Posted December 19, 2019 Hi @kaz, This is the limitation of the editor link function. Don't use the page selector. You should enter the url by hand. Gideon Link to comment Share on other sites More sharing options...
kaz Posted December 19, 2019 Author Share Posted December 19, 2019 5 hours ago, Gideon So said: Hi @kaz, This is the limitation of the editor link function. Don't use the page selector. You should enter the url by hand. Gideon Hi Gideon So, it does not work, no matter which link I enter manually, the current page is always reloaded. In the source code (frontend) I see the link to the other language, but nevertheless the same page is called. It looks like PW is blocking the whole thing. I've tried both ways: a href="https://www. ..." a href="/de/pagename" 1. the same page is updated in frontend, although another link is called in the source code. 2) In frontend the same page is refreshed, the editor does not allow any language change. It must be possible to link in an page from one language to another. Especially for lawyers it often happens that one language is referred to another. Sorry, I can't get it, but this restriction is nonsense. This restriction must be lifted, in Europe every second page is a multilanguage page ;) Link to comment Share on other sites More sharing options...
Gideon So Posted December 19, 2019 Share Posted December 19, 2019 Hi, Do you enable the language in the home page?? If must enable the language in the home page, otherwise it doesn't work. Gideon Link to comment Share on other sites More sharing options...
kaz Posted December 19, 2019 Author Share Posted December 19, 2019 It looks the same for me, it's active. Link to comment Share on other sites More sharing options...
Gideon So Posted December 19, 2019 Share Posted December 19, 2019 Can you show me the home page settings? Gideon Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 I'm stumbling into the same issue. I can't believe I haven't run into this before. My site is in Spanish by default, with English as a second language. On one of the pages, the English translation is not available, so my client just wants to link to the default Spanish page with a message in CKEditor that says something like "Please view the Spanish version of this page to learn more about…". But when I try to link to the Spanish version, I always end up on the English version, even if I change the link manually in the source code. Does anybody know any workaround? Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 3, 2021 Share Posted December 3, 2021 1 hour ago, jacmaes said: Does anybody know any workaround? Editing the link within the dialog or in the source code - like you. Yet... I never had this challenge before so far. Tried this now out of curiosity. Don't know any other way right now. WOW! Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 @wbmnfktr thanks for your answer. So we're stuck in a loop and can't break out of the currently selected language it seems. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 3, 2021 Share Posted December 3, 2021 I wouldn't say I'm stuck... but my clients could end in a dead-end for some reason (this reason). Most of my multi-language projects just show the default-language content. In case I use RepeaterMatrix (ProFields) the client or I can always add a single text-block that shows something in the non-default language and go from there. Right now I could imagine using a HannaCode block that lists all available alternative language versions... in your case it would be just the spanish version. Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 I've thought about using HannaCode too but it seems like too much overhead and work, especially if I'm not already using it and just need to implement it for this purpose. I just want to link to a page in another language, this is such a simple request that shouldn't require that type of workaround. Plus imagine explaining that to a client: "if you want to link to a page in another language on your site, a simple link like you're used to won't work, you need to insert this HannaCode snippet that…" ? Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 3, 2021 Share Posted December 3, 2021 In a client-case... I would have done probably the same as you and posted here. Haven't looked through the forums but maybe someone had this issue as well. Can't really imagine noone else ever had this issue. But ok... maybe though. For my personal projects or projects I maintain... I'd go the easiest route for whatever it would be in those cases. Another idea... you could probably use $page->viewable() within the template. Link to comment Share on other sites More sharing options...
horst Posted December 3, 2021 Share Posted December 3, 2021 Does this behave the same with internal (relative) links and external (httpUrl) links? Haven't tried, just a thought. Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 @horst yep, same thing. Link to comment Share on other sites More sharing options...
monollonom Posted December 3, 2021 Share Posted December 3, 2021 Could it be related to this somehow? 1 Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 @monollonom Good thinking, it now works if "Link abstraction" is turned off! Thanks! Too bad I have to relinquish that function though, it comes very handy most of the time. Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 3, 2021 Share Posted December 3, 2021 Probably not as you already can't choose the languaged-link from within CKEditor. Or at least we don't know how. I can manually set any link to wherever in whatever language. That work's totally fine. But... a non-developer can't switch links to different languages. Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 3, 2021 Share Posted December 3, 2021 1 minute ago, jacmaes said: it now works if "Link abstraction" is turned off! Thanks! Too bad I have to relinquish that function though, it comes very handy most of the time. You now can choose a link to another language? Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 I have to manually enter the link in the source code, as choosing it from the link dialog in CKEditor points to the page in the same language. So as @wbmnfktr says, it's no use for a non-developer. Edit: Just to clarify, before turning off "Link abstraction", I could edit the link manually to point to another language and the changes were correctly saved, but it always redirected me the current language when clicking on the link on the front-end. Now at least there's a workaround, even if it's not client-friendly at all. There should be a visual way to select other languages in the tree. 1 Link to comment Share on other sites More sharing options...
teppo Posted December 3, 2021 Share Posted December 3, 2021 The link abstraction part sounds a lot like https://github.com/processwire/processwire-issues/issues/1244 to me. Just cross-linking for reference. 2 Link to comment Share on other sites More sharing options...
jacmaes Posted December 3, 2021 Share Posted December 3, 2021 Thanks @teppo for pointing me to that bug report. It looks like it's the same issue indeed. I'll add a comment to that issue. Edit: done. 2 Link to comment Share on other sites More sharing options...
jacmaes Posted December 4, 2021 Share Posted December 4, 2021 This whole discussion points to a larger issue: There is no way to visually select a page you want to link to in another language (without diving into the source code or manually editing the link), is there? A simple use case is for a client to be able to link to a page in another language from a CKeditor field. I have to admit that I've never had the need so far in the 9+ years I've been using PW, but it seems like it should be an option, even if it's hidden by default. What do you guys think? 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 4, 2021 Share Posted December 4, 2021 I totally agree and therefore looked through threads but... no chance so far. Don't know if it's pwlink (CKEditor module from PW) or CKEditor itself that needs to be changed... maybe @ryan can clarify and give us an update. I guess and bet Ryan could clarify this or can somehow resolve this and the issue @teppo mentioned. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now