I need some help on a multilingual D9 site, trying to add links to translated node in text field. In German version should be a link to the English and French version of this node, as part of the node content.
And I need them absolute, because the nodes are used as newsletter content: https://example.de/en/node/123
I created link with language part in url, but when I view the node, the links are rendered without translation. The en/ and fr/ part in the url are stripped.
I'm using CKEditor for content creation.
Any help appreciated, thanks.
-
There's a language switcher block available on the blocks page that will automatically generate links to the same page in the other enabled languages. Does that do what you need?– Patrick KennyCommented Oct 30, 2021 at 3:31
-
I know about the language switcher block, but I need the links inside a text field with user generated content.– krabbeCommented Oct 30, 2021 at 10:49
-
1The problem seems to be CKEditor. If I use a text format without CKEditor, the links are not altered. So my solution could be to create an extra text field for the translation links and render it above or underneath my content field.– krabbeCommented Oct 30, 2021 at 11:01
Add a comment
|
1 Answer
I solved this problem by using an extra field without CKEditor to add translation links. The links are working and no language part is stripped from URL.