RenzoDocs

Locales

The UI language and the article language, the locale parameter, and the English fallback.

View as Markdown

Renzo serves six languages. Each has a public language tag:

TagLanguage
enEnglish
zh-HansChinese, simplified
zh-HantChinese, traditional
ruRussian
kkKazakh
thThai

Two languages per customer

A customer has two settings, and they are independent:

  • ui_language: the language of the interface and of messages Renzo sends, such as emails and alerts.
  • article_language: the language the customer wants to read articles in.

A Russian speaker may use an English interface and read articles in Russian. Both live on the profile. Change them with PATCH /api/v1/users/me. See Account.

The API does not apply article_language for you. Content endpoints follow the locale query parameter of each call. Read the profile once, then send its article_language as locale.

The locale parameter

Article lists, article reads, search, shelves and symbol articles take locale:

curl "$BASE/api/v1/articles?locale=ru&limit=10"
  • Leaving locale out means English.
  • An unknown tag answers 422 validation_failed.
  • Tags are case-insensitive.

English fallback

When an article has no translation in the asked locale, you get the English version. Two fields tell you what happened:

FieldMeaning
requested_localeThe language you asked for.
localeThe language you got. It differs from requested_locale after a fallback.
Response
{
  "slug": "fed-holds-rates-steady-as-inflation-cools",
  "title": "Fed holds rates steady as inflation cools",
  "locale": "en",
  "requested_locale": "ru"
}

On a list, add exact_locale=true to leave out every article that has no translation in locale, instead of showing it in English.

A full article also has available_locales, the tags it is live in, and translations, the slug of each translation. Each translation has its own slug, so use translations to switch language, not the same slug with another locale.

Calendars and other display text

The economic calendar and market holidays take locale for the names of indicators and holidays only. Numbers and dates do not change. An untranslated name falls back to English. Kazakh falls back to Russian first, then English.

On this page