Multilingual portal implementation

Certified Associate Developer

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

Parents
  • 0
    Certified Lead Developer

    I did not test that, but did you try to introduce a rule input "locale" tied to the URL parameter?

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Yes, introduced the "locale" rule input.

  • 0
    Certified Lead Developer
    in reply to nehakunjilana

    I did a small test, and the locale as selected by the user clicking that link, is perfectly persisted when switching between pages.

  • 0
    Certified Associate Developer
    in reply to Stefan Helzle

    Can you please share the code so that I could look into it.

    Thanks in Advance

  • 0
    Certified Lead Developer
    in reply to nehakunjilana

    I use a translation to see whether the language is consistent. I added this interface as a page to the portal.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
    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"
    ),
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Reply
  • 0
    Certified Lead Developer
    in reply to nehakunjilana

    I use a translation to see whether the language is consistent. I added this interface as a page to the portal.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    {
    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"
    ),
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Children
No Data