Environment variables
You can get information about the environment the game is run in. To do this, use the ysdk.environment
object.
{
app: {
id: string
},
browser: {
lang: string
},
i18n: {
lang: string;
tld: string;
},
payload: string|nil;
}
Environment object
Contains game environment variables.
Parameter |
Type |
Description |
|
table |
Game data. |
|
table |
Browser data. |
|
table |
Service internationalization. |
|
string|nil |
The value of the |
App structure
Parameter |
Type |
Description |
|
string |
Game ID. |
Browser structure
Parameter |
Type |
Description |
|
string |
Priority browser language in ISO 639-1 format. |
i18n structure
Parameter |
Type |
Description |
|
string |
Yandex Games interface language in ISO 639-1 format. For example, |
|
string |
Top-level domain. For example, |