Gretyl's Portal

Heretto Help

Show Page Sections

Heretto Portal Internationalization

Internationalization

Heretto Portal is fully internationalized, meaning the portal and its content can be presented in any language/locale combination. To have a portal that supports more than one locale, you need to localize the content in Heretto CCMS and make a few configuration changes.

The portal supports these capabilities:

  • Localization of the portal's interface, by substituting locale-specific text

  • Presentation of localized content

  • The selection of a locale by a portal visitor so that the portal responds to that locale

  • Detection of a user's locale based on the user's preferred language set in the browser

Localize the portal source content

Heretto Portal can display locales for any localized content that is stored in Heretto CCMS.

Heretto CCMS supports exporting content for localization and sending it for localization to your Localization Services Provider (LSP). Once you upload localized content to the CCMS, you can publish it to the portal.

Review the Heretto CCMS documentation for details on localizing content and storing it in the CCMS.

Localize Heretto Portal text strings

The portal interface needs to be localized for each language you want to support.

By default, the portal UI text strings are in English (en). You can customize and localize the text strings.

  1. In the config.json file, locate the i18n statement.
      "i18n": {
            "en": {
                "label.tenant": "eboat",
                "label.section": "All Sections",
                "label.home": "Home",
                "label.sections": "Sections",
                "label.section-contents": "${label.section} ${label.contents}",
                "label.contents": "Contents",
                "label.filters": "Filters",
                "label.related": "Related",
                "label.resources": "Resources",
                "label.articles": "Articles",
                "label.featured": "Featured",
                ...
           }
      }
     
    
  2. For each new locale in the "i18n" statement, perform the following steps.
    1. Copy the entire "en" block, and paste a new entry after the close bracket for "en".
    2. In the new entry, change "en" to the appropriate two-letter code.
      Note: Use the two-letter language codes as noted in ISO-639-1.
    3. Replace the new locale's text strings with translations, as appropriate.
  3. Save and close the config.json file.

    When you activate the new locales in the portal deployment, the text strings in the user interface will be in the corresponding locale.

Add locales to a deployment for an internationalized portal

With your content and portal localized, the last step is to create a deployment that supports the configured locales. You can do this by editing the existing deployment associated with your portal.

Set up a deployment to include locales by updating the existing deployment associated with your portal.

  1. In the Heretto CCMS, navigate to Administration > Deployments.
  2. Next to the deployment with one or more locales, click Edit Deployment.
  3. In the Edit Deployment window, check the box next to the locales you want to use in the portal.

    example edit deployment configuration

  4. Optionally, check the Add locale prefix to hrefs if you want the locale reflected in your URIs for the portal pages.
  5. Save your changes.

When the portal republishes the sitemap, the locales will be available.

Internationalized Strings Configuration Reference

If needed, you can easily modify the default internationalization and localization strings used by your Heretto Portal. You can use this file to change the text that shows up in your portal, such as the term "Articles".

Default Localization Strings

You can overwrite the default settings by editing the config.json file.

"i18n": {
  "en": {
    "label.tenant": "Your_Organization",
    "label.section": "Section",
    "label.home": "Home",
    "label.sections": "Sections",
    "label.section-contents": "${label.section} ${label.contents}",
    "label.contents": "Contents",
    "label.filters": "Filters",
    "label.related": "Related",
    "label.resources": "Resources",
    "label.articles": "Articles",
    "label.featured": "Featured",
    "label.filter": "Filter",
    "label.filter.apply": "Apply ${label.filter}s",
    "label.filter.clear": "Clear ${label.filter}",
    "label.filter.results": "${label.filter} Results",
    "label.result": "result",
    "label.show-contents": "Show ${label.contents}",
    "label.show-sections": "Show Page Sections",
    "label.print": "Print page",
    "label.print-sub": "${label.print} and subpages",
    "label.last-updated": "Last updated: ${date}",
    "label.related-resources": "${label.related} ${label.resources}",
    "label.related-articles": "${label.related} ${label.articles}:",
    "label.search.facet.Information_Type": "Information Type",
    "label.search.facet.Area": "Area",
    "label.search.facet.Mobile": "Mobile",
    "label.featured-articles": "${label.featured} ${label.articles}",
    "label.featured-videos": "${label.featured} Videos",
    "label.whats-new": "What's New",
    "label.version.prefix": "v ",
    "label.version.format": "${title}",
    "message.search.placeholder": "Search ${label.section} Help",
    "message.search.results": "Search Results",
    "message.missing-content": "[MISSING CONTENT]",
    "plural.0": "zero",
    "plural.1": "one",
    "plural.#": "any",
    "http.error.404": "not-found",
    "http.error.#": "other",
    "message.search.results-found": "${message.search.results-found.${@plural}}",
    "message.search.results-found.zero": "No results found",
    "message.search.results-found.one": "One result found",
    "message.search.results-found.any": "${startIndex} - ${endIndex} of ${@count} results found",
    "message.explore": "Explore Topics",
    "message.hero.title": "Welcome to ${label.tenant}'s Help Portal",
    "message.hero.sub-title": "Welcome to ${label.tenant}'s Help Portal",
    "message.error.known-issues-link": "View known issues ",
    "message.error.known-issues": "with the EZD Content Portal",
    "message.error.status": "${message.error.status.${@http.error}}",
    "message.error.next-steps": "${message.error.next-steps.${@http.error}}",
    "message.error.status.not-found": "Sorry, we couldn't find that page.",
    "message.error.status.other": "Sorry! Something seems to have broken on our end. An alert has been sent to the system admin.",
    "message.error.next-steps.not-found": "You can select a topic to open the Help or use the search field.",
    "message.error.next-steps.other": "You can select a topic to open the Help or use the search field.",
    "message.search.result-found": "Search Results",
    "message.browser.not-supported": "You seem to be using an unsupported browser.",
    "message.browser.please-use": "To visit, please use one of the following browsers:",
    "message.browser.links": "Use the links to download the latest version of a supported browser if you don't already have one installed.",
    "message.browser.chrome": "Chrome",
    "message.browser.firefox": "Firefox",
    "message.browser.edge": "Edge",
    "message.browser.safari": "Safari",
    "message.footer.copyright": "Copyright: © 2021 Intellectual Property. All rights reserved.",
    "message.chunked.title": "${content.title}",
    "message.user.welcome": "${given_name}",
    "message.user.login": "Login",
    "message.user.logout": "Logout",
    "message.login": "Please sign in.",
    "message.logout.success": "You have been successfully logged out!",
    "message.logout.login-again": "Sign in again",
    "message.logout.sso-logout": "Sign out of SSO",
    "message.logout.redirect": "This page will redirect in ${delay} seconds...",
    "message.select.version": "${selectedVersion}",
    "message.notification-banner.link-text": "Send us your feedback",
    "message.notification-banner.text": "&nbspon the new site. We appreciate it."
  }
}

Keywords

For advanced localized strings configuration, you can use the following keywords.

${page}

Using ${page} enables you to designate different text for a given key based on the page.

"message.hero.title": "${message.${page}.hero.title}",
"message.index-root.hero.title": "Welcome to the home page",
"message.section-index.hero.title": "Here's a section's landing page",
"message.content-index.hero.title": "This is the content page",
"message.search-index.hero.title": "Here are your search results",
"message.error-index.hero.title": "Looks like there's an error",
${@plural} and ${@count}

Using ${@plural} and ${@count} enables you to handle plural text options for a given sum.

"plural.0": "zero",
"plural.1": "one",
"plural.#": "any",
"message.search.results-found": "${message.search.results-found.${@plural}}",
"message.search.results-found.zero": "No results found",
"message.search.results-found.one": "One result found",
"message.search.results-found.any": "${@count} results found",