Re: Mercury template and language switcher
"laurent.druart via opencms-dev" <[email protected]> Tue, 19 Aug 2025 10:49:14 +0200
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4670008897764973294== Content-Type: multipart/alternative; boundary="Apple-Mail=_3E22D1BA-0C55-4A7F-8BD1-07CAFB440485" --Apple-Mail=_3E22D1BA-0C55-4A7F-8BD1-07CAFB440485 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello Andreas, Thanks for your answer. I=E2=80=99ll try this. Kind regards, Laurent > Le 19 ao=C3=BBt 2025 =C3=A0 08:13, Andreas Zahner via opencms-dev = <[email protected]> a =C3=A9crit : >=20 > Laurent, >=20 > first of all we do not recommend to use the single tree approach for = multi language websites, mainly because of SEO reasons: you cannot = create language specific URLs for your pages. >=20 > We developed and tested the language switcher only for websites that = are not using the single tree approach, so I cannot give you a guarantee = that it will work there. >=20 > To enable the language switcher, you have to follow these steps: >=20 > Go to the "Websites" app and edit the website where you want to use = the language switcher. > Add the following module parameters to the website configuration: > locale.main=3Dde > locale.secondary=3Den > Please note: the parameter "locale.secondary" can contain multiple, = comma separated locale names. > After that, you can use the "Compare locales" feature in the Sitemap = editor of your website. You can find it as menu entry when clicking on = the "Select view" icon (right icon on the left hand side). > In this view, you can link pages to their matching localized versions = or copy them to the other locale if no matching page exists yet. > After you have done the steps above, you can add links to other = language versions in a link sequence element and add a new link item in = the content: > For a link e.g. to the english version of your website, enter the = value "opencms://locale@en" as link target. > Place this link sequence e.g. in the header modelgroup for your pages. > If you followed these steps, the link will always point to the = corresponding page in the desired language. >=20 > Kind regards, >=20 > Andreas >=20 > --=20 > Andreas Zahner > =20 > Alkacon Software GmbH & Co. KG - The OpenCms Experts > http://www.alkacon.com <http://www.alkacon.com/> > http://www.opencms.org <http://www.opencms.org/> > Am 12.08.25 um 16:25 schrieb laurent.druart via opencms-dev: >> Hello, >>=20 >> Does mercury template contain a language switcher and if yes how to = use it? >>=20 >> I already configured my test website with single tree approach = following the documentation. >>=20 >> Thank you, >>=20 >> Kind regards, >>=20 >> Laurent >> _______________________________________________ >> This mail is sent to you from the opencms-dev mailing list >> To change your list options, or to unsubscribe from the list, please = visit >> https://lists.opencms.org/mailman/listinfo/opencms-dev >>=20 >>=20 >>=20 > _______________________________________________ > This mail is sent to you from the opencms-dev mailing list > To change your list options, or to unsubscribe from the list, please = visit > https://lists.opencms.org/mailman/listinfo/opencms-dev >=20 >=20 >=20 --Apple-Mail=_3E22D1BA-0C55-4A7F-8BD1-07CAFB440485 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;">Hello = Andreas,<div><br></div><div>Thanks for your = answer.</div><div><br></div><div>I=E2=80=99ll try = this.</div><div><br></div><div>Kind = regards,</div><div><br></div><div>Laurent<br = id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote = type=3D"cite"><div>Le 19 ao=C3=BBt 2025 =C3=A0 08:13, Andreas Zahner via = opencms-dev <[email protected]> a =C3=A9crit :</div><br = class=3D"Apple-interchange-newline"><div> =20 <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3DUTF-8"> =20 <div><p>Laurent,</p><p>first of all we do not recommend to use the = single tree approach for multi language websites, mainly because of SEO reasons: you cannot create language specific URLs for your pages.</p><p>We = developed and tested the language switcher only for websites that are not using the single tree approach, so I cannot give you a guarantee that it will work there.</p><p>To enable the language = switcher, you have to follow these steps:</p> <ul> <li>Go to the "Websites" app and edit the website where you want to use the language switcher.</li> <li>Add the following module parameters to the website configuration:</li> <ul> <li>locale.main=3Dde</li> <li>locale.secondary=3Den</li> </ul> <li>Please note: the parameter "locale.secondary" can contain multiple, comma separated locale names.</li> <li>After that, you can use the "Compare locales" feature in the Sitemap editor of your website. You can find it as menu entry when clicking on the "Select view" icon (right icon on the left hand side).</li> <li>In this view, you can link pages to their matching localized versions or copy them to the other locale if no matching page exists yet.</li> <li>After you have done the steps above, you can add links to other language versions in a link sequence element and add a new link item in the content:</li> <ul> <li>For a link e.g. to the english version of your website, enter the value "opencms://locale@en" as link target.</li> </ul> <li>Place this link sequence e.g. in the header modelgroup for your pages.</li> </ul><p>If you followed these steps, the link will always point to = the corresponding page in the desired language.</p><p>Kind = regards,</p><p>Andreas</p> <pre class=3D"moz-signature" cols=3D"72">--=20 Andreas Zahner =20 Alkacon Software GmbH & Co. KG - The OpenCms Experts <a class=3D"moz-txt-link-freetext" = href=3D"http://www.alkacon.com/">http://www.alkacon.com</a> <a class=3D"moz-txt-link-freetext" = href=3D"http://www.opencms.org/">http://www.opencms.org</a></pre> <div class=3D"moz-cite-prefix">Am 12.08.25 um 16:25 schrieb laurent.druart via opencms-dev:<br> </div> <blockquote type=3D"cite" = cite=3D"mid:[email protected]"> <pre wrap=3D"" class=3D"moz-quote-pre">Hello, Does mercury template contain a language switcher and if yes how to use = it? I already configured my test website with single tree approach following = the documentation. Thank you, Kind regards, Laurent _______________________________________________ This mail is sent to you from the opencms-dev mailing list To change your list options, or to unsubscribe from the list, please = visit <a class=3D"moz-txt-link-freetext" = href=3D"https://lists.opencms.org/mailman/listinfo/opencms-dev">https://li= sts.opencms.org/mailman/listinfo/opencms-dev</a> </pre> </blockquote> </div> _______________________________________________<br>This mail is sent to = you from the opencms-dev mailing list<br>To change your list options, or = to unsubscribe from the list, please = visit<br>https://lists.opencms.org/mailman/listinfo/opencms-dev<br><br><br= ><br></div></blockquote></div><br></div></body></html>= --Apple-Mail=_3E22D1BA-0C55-4A7F-8BD1-07CAFB440485-- --===============4670008897764973294== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGhpcyBtYWls IGlzIHNlbnQgdG8geW91IGZyb20gdGhlIG9wZW5jbXMtZGV2IG1haWxpbmcgbGlzdApUbyBjaGFu Z2UgeW91ciBsaXN0IG9wdGlvbnMsIG9yIHRvIHVuc3Vic2NyaWJlIGZyb20gdGhlIGxpc3QsIHBs ZWFzZSB2aXNpdApodHRwczovL2xpc3RzLm9wZW5jbXMub3JnL21haWxtYW4vbGlzdGluZm8vb3Bl bmNtcy1kZXYKCgoK --===============4670008897764973294==--