Skip to content

Locales

A locale tells TEBHOS which language a user prefers. Each locale is a BCP 47 tag, either a bare language subtag such as tr, or one joined to a region or numeric subtag by a hyphen, such as en-US, pt-BR or es-419.

Supported locales

Wherever TEBHOS stores a locale, such as the locale field of user settings, the value must be exactly one of the tags below, or null. Any other value is rejected with 400 BAD_REQUEST.

Value Description
ar Arabic
bg Bulgarian
cs Czech
da Danish
de German
el Greek
en-GB English (United Kingdom)
en-US English (United States)
es-ES Spanish (Spain)
es-419 Spanish (Latin America)
fi Finnish
fr French
he Hebrew
hi Hindi
hr Croatian
hu Hungarian
id Indonesian
it Italian
ja Japanese
ko Korean
lt Lithuanian
nl Dutch
no Norwegian
pl Polish
pt-BR Portuguese (Brazil)
ro Romanian
ru Russian
sv-SE Swedish
th Thai
tr Turkish
uk Ukrainian
vi Vietnamese
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)

A locale of null means the user has not chosen a language, and the client falls back to the device or browser language.

Translated interface languages

The TEBHOS web and desktop applications are currently translated into English (en-US) and Turkish (tr). Any locale in the table can be stored, but the official applications display other locales in English.

Initial locale

When an account is registered, TEBHOS seeds its locale from the request's Accept-Language header, matched against the translated languages en-US and tr:

  1. Tags are ordered by their quality weight (q), highest first; header order breaks ties.
  2. The first tag that matches en-US or tr exactly wins. Matching ignores case and accepts _ in place of -, and any regional form of Turkish (such as tr-TR) counts as tr.
  3. Otherwise the first tag whose language subtag is en or tr wins, so en-GB selects en-US.
  4. Otherwise, and when the header is missing, the locale is en-US.

* matches nothing. The user can change the locale at any time through user settings.

Localized text in API responses

API error message values are human-readable and are currently written mostly in Turkish, whatever the request; they do not follow Accept-Language or the stored locale. Clients should display their own translated text based on the error code. See Errors.

Locale changes human-readable text only

Field names, enumeration values, error codes, snowflakes and timestamps are the same in every locale.