fix(lang) fix default language selection

[0] introduced sorted language keys, but we had the assumption that the
first one meant to indicate the default language.

Break that assumption and be explicit about English being the default
language.

[0]: 7fe319d965
This commit is contained in:
Saúl Ibarra Corretgé 2022-01-20 11:22:21 +01:00 committed by Saúl Ibarra Corretgé
parent 842d715723
commit bd38df5d61
1 changed files with 2 additions and 4 deletions

View File

@ -15,8 +15,6 @@ import languageDetector from './languageDetector';
/**
* The available/supported languages.
*
* XXX The element at index zero is the default language.
*
* @public
* @type {Array<string>}
*/
@ -25,12 +23,12 @@ export const LANGUAGES: Array<string> = Object.keys(LANGUAGES_RESOURCES);
/**
* The default language.
*
* XXX The element at index zero of {@link LANGUAGES} is the default language.
* English is the default language.
*
* @public
* @type {string} The default language.
*/
export const DEFAULT_LANGUAGE = LANGUAGES[0];
export const DEFAULT_LANGUAGE = 'en';
/**
* The options to initialize i18next with.