-
Notifications
You must be signed in to change notification settings - Fork 670
/
inlang.config.js
47 lines (44 loc) · 1.02 KB
/
inlang.config.js
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
// filename: inlang.config.js
export async function defineConfig(env) {
// importing a plugin
const plugin = await env.$import(
"https://cdn.jsdelivr.net/gh/jannesblobel/inlang-plugin-po@1/dist/index.js"
);
// most plugins require additional config, read the plugins documentation
// for the required config and correct usage.
const pluginConfig = {
pathPattern:
"./rest_framework_simplejwt/locale/{language}/LC_MESSAGES/django.po",
referenceResourcePath: null,
};
return {
referenceLanguage: "en",
languages: [
"en",
"cs",
"de",
"es",
"es_AR",
"es_CL",
"fa_IR",
"fr",
"id_ID",
"it_IT",
"ko_KR",
"nl_NL",
"pl_PL",
"pt_BR",
"ro",
"ru_RU",
"sl",
"sv",
"tr",
"uk_UA",
"zh_Hans",
],
readResources: (args) =>
plugin.readResources({ ...args, ...env, pluginConfig }),
writeResources: (args) =>
plugin.writeResources({ ...args, ...env, pluginConfig }),
};
}