mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 10:49:20 +00:00
Fallback to English
This commit is contained in:
@@ -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();
|
||||
export default new Locale();
|
||||
|
||||
Reference in New Issue
Block a user