Environment variables
You can get information about the environment the game is run in. To do this, use the ysdk.environment object.
1{
2 app: {
3 id: string
4 },
5 browser: {
6 lang: string
7 },
8 i18n: {
9 lang: string;
10 tld: string;
11 },
12 payload: string|nil;
13}
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, |