Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Multilingual content

Serve an app in several languages from Exponential content - locales such as eng-US and ger-DE, the Translation parameter of REST reads, languageLocale on create, the site's languages from explanguage services…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/mobile-app-developers/content-modeling/multilingual-content.md

On this page

Multilingual content

This page is for app developers whose app shows content in more than one language. It explains how Exponential names languages, how to ask the APIs for one, and what happens with items that are not translated.

Contents

  1. How Exponential stores languages
  2. Reading a language through REST
  3. The site's languages
  4. Writing in a language
  5. Fallbacks in the app

How Exponential stores languages

Every object can hold translations in several content languages, and has a main language. Languages are named by locale codes such as eng-US, eng-GB, ger-DE, fre-FR, nor-NO. A site (a siteaccess) shows each object in the first language of its SiteLanguageList[] that the object has; objects in none of those languages are hidden unless they are "always available" (Building a multilingual site).

Reading a language through REST

Add Translation=<locale> to a node, object or field read:

curl -s -H "Authorization: Bearer $EXP_API_KEY" \
     "https://example.com/api/ezp/v2/content/node/<node id>?ResponseGroups=Fields&Translation=ger-DE"

The controller sets the content's active language to that locale before it builds the answer. The links in the answer carry the parameter on, so following them stays in the language. Three cautions from the code:

  • The parser takes the value as given; a comment in http_parser.php notes that the locale is not checked yet. Send only locales the installation has.
  • The list route does not set a language for its children; their names and fields come in the default language. Each child's link carries Translation, so a detail read of the child is in the right language.
  • Without the parameter, the language is chosen by the installation's settings for the request; check what your installation returns before you rely on it.

The site's languages

ServiceGivesAccess
explanguage::prioritizedthe languages of the siteaccess in priority orderpublic
explanguage::topthe first of thempublic
explanguage::languagesevery content language with object countspublic
exptranslation::ofObject::<object id>the translations of one objectcontent/read
exptranslation::missing::<object id>the site languages an object lackscontent/read
expnode::names::<node id>the node's name in every languagecontent/read

Use them to build the app's language menu from the server instead of a list compiled into the app.

Writing in a language

  • REST create needs languageLocale (Creating and removing content).
  • expnode::create and expnode::update take a POST field language.
  • A translation of an existing item, with its own policy content/translate, is exptranslation::translate.

Fallbacks in the app

  1. Map the device language to a locale the site has (de to ger-DE); keep the mapping in configuration, not code.
  2. Read with Translation=<locale>. If a field comes back empty while the main language has it, decide per field: show the main language with a hint, or hide the item.
  3. Cache per locale: the same node in two languages is two cache entries (Caching in the app).
  4. Right-to-left languages are supported by Exponential's content; the app's layout must mirror for them (Right-to-left sites).

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x