|
| __construct (BasicBot &$bot) |
|
string | getLanguageDatabase () |
| Get current user's language from the database, and set it in $language. More...
|
|
bool | setLanguageDatabase (string $language) |
| Set the current user language in database and internally. More...
|
|
string | getLanguageRedis (int $expiring_time=86400) |
| Get current user language from Redis (as a cache) and set it in language. More...
|
|
bool | setLanguageRedis (string $language, int $expiring_time=86400) |
| Set the current user language in both Redis, database and internally. More...
|
|
bool | loadAllLanguages (string $dir='./localization') |
| Load all localization files (like JSON) from a folder and set them in $local variable. More...
|
|
bool | loadCurrentLocalization (string $dir='') |
|
| setLocalizationDir (string $dir) |
| Change source directory for localization files. More...
|
|
| getLanguageRedis (string $default_language='en', int $expiring_time=86400) |
|
| loadCurrentLocalization (string $dir='') |
|
string | getStr ($index) |
| Get a localized string giving an index. More...
|
|
|
| $user_table = 'User' |
| Table containing bot users data into database.
|
|
| $id_column = 'chat_id' |
| Name of the column that represents the user ID into database.
|
|
| $language |
| Current user/group language.
|
|
| $language |
|
|
| $bot |
| Reference to the bot.
|
|
| $local |
|
| $localization_dir = './localization' |
| Source for localization files.
|
|
| $bot |
|
| $local |
|
|
bool | loadSingleLanguage (string $lang='en', string $dir='./localization') |
|
The documentation for this class was generated from the following file:
- src/Localization/Localization.php