Add WA.player.language in the API

This commit is contained in:
Nolway
2021-12-09 01:31:18 +01:00
committed by Alexis Faizeau
parent 77f8426788
commit 8286cdd41d
5 changed files with 31 additions and 2 deletions
+9 -1
View File
@@ -11,7 +11,7 @@ type LanguageObject = {
};
type TranslationParams = {
[key: string]: string | number
[key: string]: string | number;
};
class Translator {
@@ -122,6 +122,14 @@ class Translator {
return languageFound;
}
/**
* Get the current language
* @returns {Language} Current language
*/
public getCurrentLanguage(): Language {
return this.currentLanguage;
}
/**
* Define the current language by the navigator or a cookie
*/