My requirement is to implement the multilingual portal based on the user selection to all the page in the portal at once. Now I am using the function a!portalUrlWithLocale(), but it seems that it is working for one page at a time and when I go to the other page, I need to select the preferred language again or else the default language (English) comes to other page.
So Kindly can anyone suggest what needs to be done.
Discussion posts and replies are publicly visible
I did not test that, but did you try to introduce a rule input "locale" tied to the URL parameter?
Yes, introduced the "locale" rule input.
I did a small test, and the locale as selected by the user clicking that link, is perfectly persisted when switching between pages.
Can you please share the code so that I could look into it.
Thanks in Advance
I use a translation to see whether the language is consistent. I added this interface as a page to the portal.
{ a!linkField( label: "Link", labelPosition: "ABOVE", links: { a!safeLink( label: "de", uri: a!portalUrlWithLocale("de"), openLinkIn: "SAME_TAB" ), a!safeLink( label: "en", uri: a!portalUrlWithLocale("en_US"), openLinkIn: "SAME_TAB" ), a!safeLink( label: "it", uri: a!portalUrlWithLocale("it"), openLinkIn: "SAME_TAB" ), } ), a!richTextDisplayField( value: 'translation!{a7880d6e-74e0-464f-bc26-08ed8a90fd3e}SSH Translations.{14d0c3f3-0f02-41f9-bf18-564777c5b2a9}Student Rating' ) }