Quick question about multilingual websites

Hello,

I’ve now set up an English version of my website in addition to the German one.

I have a question about this. After activation, the language switcher icon appears.

Is there a way to also include the language switcher as text with a corresponding link on each page?

I haven’t been able to find anything about this.

Thank you for a quick reply.

Best regards, Klaus

see if this tutorial from @Daniel will do what you want

https://lab.danielleu.com/blog/customizing-language-selector/

Thank you for your feedback.

I’ll give it a try. So far, I haven’t made any changes to the stylesheet.

Although, I was actually thinking that the switch could be integrated into existing text via a hyperlink.

Do you know if that’s possible?

Thanks again and best regards, Klaus

I don’t think a hyperlink will work. I believe the language selection triggers javascript.

If you try Daniel’s suggestion, be sure to do it with a custom stylesheet rather than trying to edit the Backlight generated style sheet.

Hi, I entered the code into the CSS file as described and activated it in the corresponding template.

However, it doesn’t seem to be working for me. There are no visible changes; only the toggle icon is visible, just like before.

Do I need to adjust anything else?

Try clearing template cache from the link on the Special Links page
(Admin > Special links)

Can you share a link to your site?

Thanks for your feedback.

I cleared the cache, but that didn’t help.

I’m attaching the links to the pages for you.

Here’s the version without CSS:

I enabled CSS in the template for these pages:

The CSS only makes the header disappear…

I just noticed that the language is now displayed in the icon. So far, so good.

But why does the header disappear? I don’t understand that.

Because a rule to do just that is in your custom css file. Right at the top.

Is there a reason you’re including all the code that precedes the language icon styling?

Ah, I see. There’s no reason why I put the text at the end of the CSS file. It was just for testing.

I’ll move the code to the beginning now and see if anything changes…

Thank you!

the rule to hide the masthead will still be there though.
If the only thing you want to do with css is the language icon, then you don’t need the rest.

Okay, I’ve changed it again and am now using CSS that only contains the code for the language selection.

It seems to be working now.

Thank you so much for your help!

Best regards, Klaus