get_enable_subtitles_by_default
read-only$locs.get_enable_subtitles_by_default() -> boolGets whether or not to enable subtitles by default in the current language.
Returns bool: True to enable default subtitles, false otherwise.
Localised text.
13 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).
$locs.get_enable_subtitles_by_default() -> boolGets whether or not to enable subtitles by default in the current language.
Returns bool: True to enable default subtitles, false otherwise.
$locs.get_keyboard_layout() -> intNote this doesn't detect the actual keyboard layout. See locs.set_keyboard_layout().
Returns int: The keyboard layout as vlocs_keyboard_layout_t.
$locs.get_language() -> stringGet the current language.
Returns string: The 2-digit language code for the current language.
$locs.get_platform_appearance() -> intGet the current platform appearance.
Returns int: The numeric ID of the current platform appearance.
$locs.get_platform_appearance_for_gamepad(gamepad_index: int) -> intGet the platform appearance associated with a specified gamepad index.
| Parameter | Type | Meaning |
|---|---|---|
gamepad_index | int | The gamepad index to check. |
Returns int: The platform appearance of the gamepad.
$locs.get_platform_appearance_name() -> stringGet the name of the current platform appearance.
Returns string: Name of the current platform appearance.
$locs.set_formatter_value(formatter: Reference, value: var)Set the underlying value of a number formatter.
| Parameter | Type | Meaning |
|---|---|---|
formatter | Reference | The formatter to set the value on. |
value | var | The value to set. |
$locs.set_keyboard_layout(keyboard_layout: int)Sets the current keyboard layout for display. To detect the current keyboard layout, see input.detect_keyboard_layout().
| Parameter | Type | Meaning |
|---|---|---|
keyboard_layout | int | The keyboard layout as vlocs_keyboard_layout_t. |
$locs.set_language(lang: string)Set the current language.
| Parameter | Type | Meaning |
|---|---|---|
lang | string | The 2-digit language code for the language to set. |
$locs.set_platform_appearance(platform_appearance: int)Set the current platform appearance if on PC. This primarily affects text glyphs.
| Parameter | Type | Meaning |
|---|---|---|
platform_appearance | int | The desired platform appearance. |
$locs.string_has_current_language(text: Reference) -> boolReturns if the localized text object has a translation for the current language.
| Parameter | Type | Meaning |
|---|---|---|
text | Reference | The localized string data. |
Returns bool: If the localized text object has a translation for the current language.
$locs.translate_ref(ref: Reference) -> ReferenceGets the correct object for the current language from a localized ref object.
| Parameter | Type | Meaning |
|---|---|---|
ref | Reference | The localized ref data. |
Returns Reference: The translated reference.
$locs.translate_string(text: Reference) -> stringGets the correct translation for the current language from a localized text object.
| Parameter | Type | Meaning |
|---|---|---|
text | Reference | The localized string data. |
Returns string: The translated text.