We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4330b34 commit d2406aeCopy full SHA for d2406ae
src/IntlContainer.js
@@ -6,17 +6,20 @@ import type { LanguageTag } from './types';
6
import messages from './messages.json';
7
8
function getLangFromLocalStorage(): LanguageTag {
9
+ const defaultLang = 'en';
10
+
11
if (window.localStorage) {
12
switch (window.localStorage.getItem('c2lc-lang')) {
13
case('en'):
14
return 'en';
15
case('fr'):
16
return 'fr';
17
default:
- // Fall through
18
+ return defaultLang;
19
}
20
- return 'en';
21
22
23
24
25
function setHtmlLang(lang: LanguageTag) {
0 commit comments