From 9b5722b891b5bb4e35a738c84d1e5416ddb6c98a Mon Sep 17 00:00:00 2001 From: Yuzu Date: Tue, 7 Jun 2022 13:00:01 +0700 Subject: [PATCH] Fallback to English --- src/providers/Locale.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/providers/Locale.ts b/src/providers/Locale.ts index 46ea5bd..2dfa9ac 100644 --- a/src/providers/Locale.ts +++ b/src/providers/Locale.ts @@ -10,19 +10,20 @@ class Locale { } public init(): void { - Logger.log('info', 'Loaded locales: ' + this.getLocaleProvider("en").getLocales().join(', ')); + Logger.log('info', 'Loaded locales: ' + this.getLocaleProvider('en').getLocales().join(', ')); } public getLocaleProvider(locale: string) { const i18n = new I18n(); i18n.configure({ directory: this.localePath, - objectNotation: true - }) + objectNotation: true, + defaultLocale: 'en', + retryInDefaultLocale: true + }); i18n.setLocale(locale); return i18n; } - } -export default new Locale(); \ No newline at end of file +export default new Locale();