project: Update README

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2018-11-29 03:00:33 +01:00
committed by Michael Fabian Dirks
parent 4aac5d2267
commit 3a02539ed6
2 changed files with 49 additions and 6 deletions
+4 -4
View File
@@ -67,17 +67,17 @@ This cache is refreshed when first attempting to translate to that language,
class I18n {
/** Create a new object, ready to be used.
*
* @param {string} language Initial base language to base all translations on.
* @param {string} defaultLanguage Initial base language to base all translations on.
* @param {string} baseLanguageKey Key to use for base language overrides. (Default = _base)
* @throws Exception on invalid parameters.
*/
constructor(language, baseLanguageKey = '_base') {
this._sanitizeLanguage(language);
constructor(defaultLanguage, baseLanguageKey = '_base') {
this._sanitizeLanguage(defaultLanguage);
this._verifyKey(baseLanguageKey);
this.languages = new Map();
this.chains = new Map();
this.baseLanguage = language;
this.baseLanguage = defaultLanguage;
this.baseLanguageKey = baseLanguageKey;
this.dirtyTs = performance.now();