Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit15ce14a4c1

README.md

language_menu

The person's language on this client.

It declares the Language group of the client settings (clientSettings), a tab of the app menu's System section. A player reaches it from the pause menu and from the world chooser; the editor reaches it from its Zero menu (Settings), and its own Settings menu lists the same choices under Language.

The group holds one setting, language.locale:

  • Follow my device: no choice of the person's, so the language follows the chain i18n.sources() states: the language ZeroMind shows them, then their device's (or browser's) languages, then English;
  • every language the engine offers (i18n.offered()), each by its own name (nativeName), so a person always recognises their own.

The setting's description says which language is in force and why (language_menu.inForce()). A pick is the person's choice (i18n.choose), kept on the device for their account, so it holds on the next start; the setting reads it back from i18n.choice() rather than keeping a copy of its own (kept in clientSettings.register).

choices() lists the choices with the one the setting holds marked, and pick(value) takes one ("device" clears the choice).