Skip to main content

Module i18n

Module i18n 

Source
Expand description

Every sentence Sioul shows, in your language.

The core decides and returns facts: lanes, reasons, counts. This module turns them into sentences with Project Fluent, which handles plurals and agreement per language (“une lettre est arrivée”, “deux lettres sont arrivées”) where gettext’s plural forms alone cannot. Each language is one file, locales/<language>/sioul.ftl; English stands in for any message a translation lacks (docs/i18n.md).

Structs§

Translator
Sentences in one language.

Constants§

LANGUAGES
The languages Sioul speaks, with their translations, built into the program.

Functions§

args
Empty arguments, for callers that do not depend on Fluent themselves.
base_language 🔒
“fr_FR.UTF-8” → “fr”; “en-GB” → “en”.
bundle 🔒
defined 🔒
Whether a Fluent file defines the message id (a line “id = …”), read without parsing the file.
format 🔒
group_thousands 🔒
“1234567” → “1,234,567” with this language’s separator.
kind_id 🔒
percent
A probability as a whole percentage, never above what it is: 0.9496 is 94, so that a doubt never reads as the spam threshold it stays below.
project_title 🔒
proof_id 🔒
system_language
The language of the session: LC_ALL, LC_MESSAGES, then LANG; English if none.

Type Aliases§

Bundle 🔒