There was an error while loading. Please reload this page.
1 parent a89c7a7 commit 9450f59Copy full SHA for 9450f59
1 file changed
src/index.ts
@@ -1,21 +1,3 @@
1
-class Internationalization<T extends string> {
2
- supportedLanguages: T[]
3
- fallbackLanguage: T
+import ClientInternationalization from './ClientInternationalization'
4
5
- constructor(supportedLanguages: T[], fallbackLanguage: T) {
6
- this.supportedLanguages = supportedLanguages
7
- this.fallbackLanguage = fallbackLanguage
8
- }
9
-
10
- detectBrowserLanguage(): T {
11
- const browserLanguage =
12
- (navigator.languages && navigator.languages[0]) || navigator.language
13
14
- return (
15
- this.supportedLanguages.find((lang) => lang === browserLanguage) ||
16
- this.fallbackLanguage
17
- )
18
19
-}
20
21
-export { Internationalization as default }
+export { ClientInternationalization }
0 commit comments