1

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.

3
  • 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? Commented 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.
    – krabbe
    Commented Oct 30, 2021 at 10:49
  • 1
    The 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.
    – krabbe
    Commented Oct 30, 2021 at 11:01

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.