Golub

Languages and translations

Golub is available in:

LanguageCode
Englishen
Serbian (Latin)sr-Latn
Arabicar

Users pick their language on the login page or in Settings → General. Without a choice, Golub follows the browser's languages, then the server default GOLUB_DEFAULT_LOCALE. A host panel can also pass the language in the single sign-on token.

Only the chosen language is downloaded, so adding languages doesn't make Golub slower to load.

Right to left

Arabic switches the whole interface to right to left: the folder column moves to the right, and menus and icons are mirrored.

Arabic login page

The text of every message picks its own direction, in any interface language, so an Arabic or Hebrew message reads correctly in the English interface too.

How translations work

Each language is one JSON file in web/src/locales, keyed by message id. English (en.json) is the source:

"compose.send": "Send",
"folders.unread": { "one": "{count} unread message", "other": "{count} unread messages" }
  • Words in braces such as {count} or {folder} are filled in by Golub. Keep them, but move them wherever your sentence needs them.
  • Messages that depend on a number list every plural form your language has, the ones Intl.PluralRules reports: English has one and other, Serbian adds few, Arabic uses zero, one, two, few, many and other.
  • Dates, times, numbers and file sizes are formatted by the browser for the language, so they need no translation.

Fixing or finishing a translation

Edit the language file, then run the check, which reports missing or unknown keys and missing plural forms:

cd web && npm ci && node scripts/check-locales.mjs

Adding a language

  1. Copy en.json to the new language code, for example de.json, and translate it.
  2. Add the language to loaders in web/src/lib/locale.svelte.ts.
  3. Add the code to Locales in internal/config/config.go.
  4. Add a language.<code> entry with the language's own name (for example "language.de": "Deutsch") to every language file.
  5. Hebrew, Persian and Urdu are already known as right to left; for another right-to-left language, add its code to RTL in web/src/lib/i18n.ts.
  6. Run the check above and send a pull request.

The Arabic translation was made without a native speaker, so corrections there are especially welcome.

Edit this page on GitHub

Your mail server deserves a better webmail.

The real interface with made-up mail. Nothing to install, no sign-up.

Golub showing the inbox with an open message