Class I18n
java.lang.Object
io.github.jbastgen.stemma.app.i18n.I18n
The language of the user interface (feature 9). Texts are looked up by their English wording:
I18n.t("Pull") gives the
text of the chosen language, and the English text itself when the language has none, so a missing translation is never a
problem. The texts are in /i18n/<code>.tsv (UTF-8, English TAB translation); en.tsv lists the keys.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.scene.image.ImageThe picture of the flag of a language (systemgives a globe), 48 x 32 pixels, or null when there is none.static Stringlanguage()The code of the language in use.static List<I18n.Language> The languages Stemma has, English first.static StringThe singular text whencountis 1, else the plural text; both are looked up and filled in liket(java.lang.String).static StringThe language to use for a setting: a code, or empty for the language of the system (English when Stemma has none).static voidsetLanguage(String code) Switches the language; takes effect for the texts made from now on.static StringThe text in the chosen language; the English text when there is none.static String
-
Method Details
-
languages
The languages Stemma has, English first. -
flag
The picture of the flag of a language (systemgives a globe), 48 x 32 pixels, or null when there is none. Pictures are used because JavaFX cannot draw the emoji flags (they show as two letters); seeapp/tools/make_flags.py. -
resolve
The language to use for a setting: a code, or empty for the language of the system (English when Stemma has none). -
setLanguage
Switches the language; takes effect for the texts made from now on. -
language
The code of the language in use. -
t
The text in the chosen language; the English text when there is none. -
n
The singular text whencountis 1, else the plural text; both are looked up and filled in liket(java.lang.String). -
t
-