-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathi18n.ts
70 lines (63 loc) · 1.73 KB
/
i18n.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import aspectRatio from './i18n/en/aspectRatio.json';
import base64 from './i18n/en/base64.json';
import caseConverter from './i18n/en/caseConverter.json';
import characterCounter from './i18n/en/characterCounter.json';
import colors from './i18n/en/colors.json';
import common from './i18n/en/common.json';
import css from './i18n/en/css.json';
import html from './i18n/en/html.json';
import htmlCharCodes from './i18n/en/htmlCharCodes.json';
import imageConverter from './i18n/en/imageConverter.json';
import jsonFormat from './i18n/en/jsonFormat.json';
import loremIpsum from './i18n/en/loremIpsum.json';
import markdown from './i18n/en/markdown.json';
import notFound from './i18n/en/notFound.json';
import offline from './i18n/en/offline.json';
import queryString from './i18n/en/queryString.json';
import regex from './i18n/en/regex.json';
import textDiff from './i18n/en/textDiff.json';
import top from './i18n/en/top.json';
import totp from './i18n/en/totp.json';
import urlEncode from './i18n/en/urlEncode.json';
import uuid from './i18n/en/uuid.json';
export const defaultNS = 'common';
export const resources = {
en: {
aspectRatio,
common,
colors,
top,
base64,
css,
html,
htmlCharCodes,
imageConverter,
jsonFormat,
loremIpsum,
queryString,
regex,
textDiff,
urlEncode,
uuid,
notFound,
offline,
markdown,
caseConverter,
characterCounter,
totp,
},
} as const;
// Used for Jest
i18n.use(initReactI18next).init({
lng: 'en',
fallbackLng: 'en',
ns: Object.keys(resources.en),
defaultNS: 'common',
interpolation: {
escapeValue: false,
},
resources,
});
export default i18n;