Add WA.player.language in the API
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user