What is the best method to add a culture switch to our live url pages? Currently we came up with using a replace method in our macro, Do you have some macro's that you could share of a better way?
Our current way code in the Master Page layout:
<a href="{%CurrentDocument.AbsoluteURL.Replace("es-es","en-us")%}" aria-label="Language"> English</a> <a href="{%CurrentDocument.AbsoluteURL.Replace("en-us","es-es")%}" aria-label="Language"> Español</a>
You can use the following web parts from Portal Engine (out of the box)-
<a href="{%HTMLEncode(URL)%}"> {% HTMLEncode(CultureName) %} ({% HTMLEncode(CultureCode) %}) </a>
Please, sign in to be able to submit a new answer.