module

Launcher::Locale

Constants

AVAILABLE = {"en" => "English", "ru" => "Русский"}

Display order of the language selector; keys are I18n locale codes.

Class methods

detect

LANG/LC_ALL based detection: "ru_RU.UTF-8" -> "ru", else "en".

Source
init(preferred : String | Nil = nil) : String

Initialize I18n with the embedded catalogs and activate preferred (when it is a known locale) or the system-detected one. Idempotent; returns the activated locale code.

Source
initialized?
Source
set(locale : String) : Nil
Source