meta data for this page
l10n.add(language, key, value)
Registers a text in the given language
(string, e.g. en
). The text will be identified by its key
(string) and its value (returned e.g. by l10n.get()
) will be equal to value
(string).
function l10n.add(language, key, value)
l10n.get(key, fallback)
Returns the correct translation for key
. If the text cannot be found, fallback
(optional string) will be returned. In case no fallback
is specified, it will return l10n/key
.
function l10n.get(key, fallback)
l10n.getDollar(key)
Depending on key
(string), the function will
- return
l10n.get(key:sub(2))
if key starts with a dollar sign ($
), or otherwise - return
key
.
Using this function, it is possible to allow both untranslated text (starting with any letter or character except $
) and translated texts (starting with $
and then containing the text's key
).
function l10n.getDollar(key)
l10n.getLanguage()
Returns the currently active language (e.g. en
, de
, etc.).
function l10n.getLanguage()
l10n.getSystemLanguage()
Returns the user's system language (e.g. en
, de
, etc.).
function l10n.getSystemLanguage()
l10n.setLanguage(language)
Sets the currently active language to language
. Note that this will not change any texts that have been translated before changing the language (those will remain in the previously active language).
function l10n.setLanguage(language)
l10n.getMetreString(value)
Displays a length of value
metres (float) in the appropriate form for the currently active language, i.e. a value of 1
will be translated as
3.28 ft
in case the current language isen
and1.00 m
for all other languages.
function l10n.getMetreString(value)
Copyright
All contents of this page may be used for modding use for Winter Resort Simulator only. Any use exceeding this regulation is not permitted.
Copyright (C) HR Innoways, 2020. All Rights Reserved.