Skip to content

Commit 270de8a

Browse files
author
Mikhail Bashkirov
committed
fix(localize): set default fallback locale "en-GB" (fix #152)
1 parent e7ea9cb commit 270de8a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/localize/src/localize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { LocalizeManager } from './LocalizeManager.js';
33
// eslint-disable-next-line import/no-mutable-exports
44
export let localize = LocalizeManager.getInstance({
55
autoLoadOnLocaleChange: true,
6+
fallbackLocale: 'en-GB',
67
});
78

89
export function setLocalize(newLocalize) {

packages/localize/test/localize.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ describe('localize', () => {
3838
it('is configured to automatically load namespaces if locale is changed', () => {
3939
expect(localize._autoLoadOnLocaleChange).to.equal(true);
4040
});
41+
42+
it('is configured to fallback to the locale "en-GB"', () => {
43+
expect(localize._fallbackLocale).to.equal('en-GB');
44+
});
4145
});

0 commit comments

Comments
 (0)