Multilingual support

This page outlines multi-lingual support information.

Translate API

Translation API

POST <Cinchy-URL>/API/Translate

Pass in a list of literal GUIDs, along with a language and region. If translations are found in that language, they will be returned.

Request Body

NameTypeDescription

debug

boolean

Defaults to false if not specified. Debug true will explain why that string was returned as the translation.

region

string

Subtag from the Regions table. User's preferences will be used if not specified.

guids

array

Array of strings. Guids from the Literals table.

language

string

Subtag from the Languages table. User's preferences will be used if not specified.

{
  "data": {
    "button.create": {
      "translation": "Create",
      "language": "en",
      "region": "US",
      "defaultText": false
    },
    "button.cancel": {
      "translation": "Cancel",
      "language": null,
      "region": null,
      "defaultText": true
    },
    "button.favorite": {
      "translation": "Favourite",
      "language": "en",
      "region": "CA",
      "defaultText": false
    },
    "button.delete": {
      "translation": "button.delete",
      "language": null,
      "region": null,
      "defaultText": false
    }
  }
}

Logic

  • If the translation exists in the language and region specified, it will be returned.

  • If the translation exists in the language but not the specified region, it will still be translated and returned.

  • If the GUID exists but it's not available in the specified language, the default text in the Literals table will return.

  • If the GUID doesn't exist or you don't have permission to it, it will return the GUID back as the translation.

System Tables

Cinchy has three tables to provide language support.

  1. [Cinchy].[Literal Groups]

  2. [Cinchy].[Literals]

  3. [Cinchy].[Literal Translations].

Literal Groups

This table can optionally be used to group the translations. The default Cinchy strings belong to the Cinchy literal group. We recommend you create one literal group per applet or UI so you can retrieve the full list of GUIDs required for that page/applet easily.

Literals

This table defines all the strings that you want to translate.

Default Text

String that displays if no translation is found for the language specified.

GUID

GUID used to refer to the literal. A UUID will be generated by default, but can be overrode using the GUID Override field to something more human-readable.

Literal Group

Use this to group your strings so they can be easily retrieved. Note that this is a multi-select so you can use a single literal for multiple applets (including using the default Cinchy literals and translations for custom applets).

Literal Translations

This is the table where the translations are stored.

Translated Text

This is the translated string that's returned.

Literal

This is the literal the translation is for.

Language and Region

A language must be specified for a translation. Region can also be optionally specified for region specific words (ex. color vs colour).​

Last updated