Extra Horizon
GitHub
  • Extra Horizon Documentation
  • Getting Started
    • Start familiarizing yourself
  • Tutorials
    • Medical Device Tutorial
      • Preparation
      • Build your first prototype
        • Define a data model
        • Configure your workflows
          • Workflow 1: Analyze a measurement
          • Workflow 2: Create & store a PDF report
          • Workflow 3: Send an e-mail
        • Define your permissions
          • Update your schema with user permissions
          • Update your schema with group permissions
        • Build the Front-End
          • Set up oAuth in your backend
          • Demo login page
      • Summary & Wrap up
    • Polysomnography (PSG) Tutorial
    • Retool - Building dashboards Tutorial
  • FAQ
    • General
  • Services
    • Identity and Access Management
      • User service
        • Users
        • Groups
        • Global roles
        • Configuration
      • Auth Service
        • Applications
        • OAuth2
        • OAuth1
        • MFA
        • OpenID Connect
          • Google Cloud
          • Azure ADFS
    • Data Management
      • File Service
      • Data Service
        • Schemas
        • Documents
        • FAQ Data Service
    • Automation
      • Task Service
        • Functions
        • Tasks
        • API Functions
        • Examples
          • Hello world (JS)
          • Hello world (Py)
          • Hello world (Docker)
        • FAQ
      • Dispatchers Service
      • Event Service
        • System Events
    • Communication
      • Notification Service
        • Notifications
        • Settings
      • Mail Service
    • Other
      • Localization Service
        • Language Codes
      • Template Service
        • Localizations
      • Payments Service
        • Subscriptions
        • Stripe
        • iOS App Store
      • Configurations Service
  • API Reference
    • OpenAPI Specifications
    • 📦Changelog
      • Per-service Changelog
    • Postman Reference Collection
  • Tools
    • SDK
    • CLI
    • Control Center
  • Additional Resources
    • Resource Query Language (RQL)
    • Handling Errors
    • GitHub
    • API interaction (Python)
    • Migration guide: Enabling verification request limiting
  • ExH Platform
    • 🙋Support
    • ⏱️Usage and Performance
    • 🔓Security
    • 🗺️Regions
    • ⚖️Cloud Subscription Agreement
    • Security, Privacy & Quality
      • 🇺🇸CFR 21 Part 11
Powered by GitBook
On this page
  • Localizations
  • Managing localizations
  • Using localizations
  • Support in Extra Horizon services
  • In your application(s)

Was this helpful?

  1. Services
  2. Other

Localization Service

PreviousOtherNextLanguage Codes

Last updated 8 months ago

Was this helpful?

The Localization Service is a simple service that features storage and retrieval of text snippets, translated into multiple languages. A snippet is identified by a key, for example mail_closing, and has associated values in all translated languages.

The as well as the are aware of the Localization Service, and have . They both use the Localization Service in order to generate notifications, emails and PDFs in appropriate languages based on a pre-defined template, which in turn are filled with localization keys that can be managed by the Localization Service.

Localizations

Translated text snippets can be stored in Localization objects, which are uniquely identified by the key attribute. The translations and their respective language codes () are stored as key-value pairs in the text attribute.

{
  "key": "mail_closing",
  "text": {
    "EN": "Kind regards,",
    "NL": "Met vriendelijke groeten,"
  }
}

Tip: It is recommended to compose text snippets with complete sentences because the order of words in a sentence can differ between languages due to their unique set of grammar rules.

Managing localizations

The easiest way to manage your localizations is by using the .

The ExH CLI allows you to simply define your localizations as a list of key/value pairs per language. When instructed, the CLI will combine these into localization objects and sync them with the Localization Service.

Example file structure:

localizations/EN.json
{
  "mail_closing": "Kind regards,"
}
localizations/NL.json
{
  "mail_closing": "Met vriendelijke groeten,"
}
exh localizations sync

Using localizations

Once you have configured your localizations, you can use them in your application or within ExH services which have localization support.

Support in Extra Horizon services

In your application(s)

For example, to retrieve translated texts form the mail_closing localization in Dutch and English:

const texts = await sdk.localizations.getByKeys({
  localizations: ['mail_closing'],
  localizationCodes: ['NL', 'EN'],
});

console.log(texts['mail_closing'].NL);

Syncing the localizations with the CLI will result in a localization matching the example mentioned in the above:

See the for more information.

As mentioned before, the has built-in support for localizations. This also affects the , which uses the Template Service to generate emails. Allowing you to create fully localized emails.

You can also use the Localization Service directly in your application(s) by using the .

Notification Service
Template Service
built-in support for localizations
ISO 639-1
ExH CLI
ExH CLI documentation regarding localizations
Template Service
Mail Service
ExH SDK
Localizations section
See the Template Service documentation on how to use localizations in your templates.
See the Mail Service on how to send emails based on templates.