↳ Translations

AirConsole

new AirConsole(opts) → {AirConsoleObject}

Your gateway object to AirConsole. There are getter and setter functions for all properties. Do not access properties of this object directly.
Parameters:
Name Type Description
opts AirConsole~Config Constructor config, see bellow.
Source:
Returns:
The AirConsole object.
Type
AirConsoleObject

Methods

getLanguage(device_id) → {String}

Returns the current IETF language tag of a device e.g. "en" or "en-US"
Parameters:
Name Type Description
device_id number | undefined The device id for which you want the language. Default is this device.
Source:
Returns:
IETF language
Type
String

getTranslation(id, values)

Gets a translation for the users current language See http://developers.airconsole.com/#!/guides/translations
Parameters:
Name Type Description
id String The id of the translation string.
values Object | undefined Values that should be used for replacement in the translated string. E.g. if a translated string is "Hi %name%" and values is {"name": "Tom"} then this will be replaced to "Hi Tom".
Source: