@intlayer/docs 9.0.2 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/generated/docs.entry.cjs +20 -0
- package/dist/cjs/generated/docs.entry.cjs.map +1 -1
- package/dist/esm/generated/docs.entry.mjs +20 -0
- package/dist/esm/generated/docs.entry.mjs.map +1 -1
- package/dist/types/generated/docs.entry.d.ts +1 -0
- package/dist/types/generated/docs.entry.d.ts.map +1 -1
- package/docs/ar/dictionary/content_file.md +24 -1
- package/docs/ar/dictionary/select.md +386 -0
- package/docs/de/dictionary/content_file.md +24 -1
- package/docs/de/dictionary/select.md +386 -0
- package/docs/en/dictionary/content_file.md +24 -1
- package/docs/en/dictionary/select.md +382 -0
- package/docs/en-GB/dictionary/content_file.md +24 -1
- package/docs/en-GB/dictionary/select.md +385 -0
- package/docs/es/dictionary/content_file.md +24 -1
- package/docs/es/dictionary/select.md +385 -0
- package/docs/fr/dictionary/content_file.md +24 -1
- package/docs/fr/dictionary/select.md +382 -0
- package/docs/hi/dictionary/content_file.md +24 -1
- package/docs/hi/dictionary/select.md +386 -0
- package/docs/id/dictionary/content_file.md +24 -1
- package/docs/id/dictionary/select.md +386 -0
- package/docs/it/dictionary/content_file.md +24 -1
- package/docs/it/dictionary/select.md +386 -0
- package/docs/ja/dictionary/content_file.md +24 -1
- package/docs/ja/dictionary/select.md +386 -0
- package/docs/ko/dictionary/content_file.md +24 -1
- package/docs/ko/dictionary/select.md +386 -0
- package/docs/pl/dictionary/content_file.md +24 -1
- package/docs/pl/dictionary/select.md +386 -0
- package/docs/pt/dictionary/content_file.md +24 -1
- package/docs/pt/dictionary/select.md +386 -0
- package/docs/ru/dictionary/content_file.md +25 -2
- package/docs/ru/dictionary/select.md +386 -0
- package/docs/tr/dictionary/content_file.md +24 -1
- package/docs/tr/dictionary/select.md +386 -0
- package/docs/uk/dictionary/content_file.md +24 -1
- package/docs/uk/dictionary/select.md +386 -0
- package/docs/vi/dictionary/content_file.md +24 -1
- package/docs/vi/dictionary/select.md +386 -0
- package/docs/zh/dictionary/content_file.md +24 -1
- package/docs/zh/dictionary/select.md +387 -0
- package/package.json +7 -7
- package/src/generated/docs.entry.ts +20 -0
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
---
|
|
2
|
+
createdAt: 2026-07-30
|
|
3
|
+
updatedAt: 2026-07-30
|
|
4
|
+
title: 基于选择的内容
|
|
5
|
+
description: 了解如何在 Intlayer 中使用基于选择的内容,以根据任意字符串值动态显示内容。按照本指南高效地在项目中实现类似 switch 语句的内容。
|
|
6
|
+
keywords:
|
|
7
|
+
- 基于选择的内容
|
|
8
|
+
- 选择内容
|
|
9
|
+
- Select Content
|
|
10
|
+
- Switch 内容
|
|
11
|
+
- ICU select
|
|
12
|
+
- 动态渲染
|
|
13
|
+
- 文档
|
|
14
|
+
- Intlayer
|
|
15
|
+
- Next.js
|
|
16
|
+
- JavaScript
|
|
17
|
+
- React
|
|
18
|
+
slugs:
|
|
19
|
+
- doc
|
|
20
|
+
- concept
|
|
21
|
+
- content
|
|
22
|
+
- select
|
|
23
|
+
history:
|
|
24
|
+
- version: 9.1.0
|
|
25
|
+
date: 2026-07-30
|
|
26
|
+
changes: "引入基于选择的内容"
|
|
27
|
+
author: aymericzip
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# 基于选择的内容 (Select) / Intlayer
|
|
31
|
+
|
|
32
|
+
## Select 的工作原理
|
|
33
|
+
|
|
34
|
+
在 Intlayer 中,基于选择的内容是通过 `select` 函数实现的,它将任意字符串值映射到相应的内容。这相当于 ICU 的 `{value, select, …}` 消息,或者应用程序代码中的 `switch` 语句。
|
|
35
|
+
|
|
36
|
+
当判别条件是一个自由格式的字符串时(如状态、计划、平台、角色),请使用 `select`。对于其他判别条件,Intlayer 提供了专用的节点:
|
|
37
|
+
|
|
38
|
+
| 判别条件 | 节点 |
|
|
39
|
+
| -------------- | ---------- |
|
|
40
|
+
| 一个数量 | `enu()` |
|
|
41
|
+
| 一个布尔值 | `cond()` |
|
|
42
|
+
| 一个性别 | `gender()` |
|
|
43
|
+
| 任何其他字符串 | `select()` |
|
|
44
|
+
|
|
45
|
+
## 设置基于选择的内容
|
|
46
|
+
|
|
47
|
+
要在您的 Intlayer 项目中设置基于选择的内容,请创建一个包含选择定义的内容模块。下面是不同格式的示例。
|
|
48
|
+
|
|
49
|
+
```typescript fileName="**/*.content.ts" contentDeclarationFormat={["typescript", "esm", "commonjs"]}
|
|
50
|
+
import { select, type Dictionary } from "intlayer";
|
|
51
|
+
|
|
52
|
+
const myPostContent = {
|
|
53
|
+
key: "my_key",
|
|
54
|
+
content: {
|
|
55
|
+
publishStatus: select({
|
|
56
|
+
draft: "This post is a draft",
|
|
57
|
+
published: "This post is live",
|
|
58
|
+
scheduled: "This post is scheduled",
|
|
59
|
+
fallback: "Unknown status", // 可选
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
} satisfies Dictionary;
|
|
63
|
+
|
|
64
|
+
export default myPostContent;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```json5 fileName="**/*.content.json" contentDeclarationFormat="json"
|
|
68
|
+
{
|
|
69
|
+
"$schema": "https://intlayer.org/schema.json",
|
|
70
|
+
"key": "my_key",
|
|
71
|
+
"content": {
|
|
72
|
+
"publishStatus": {
|
|
73
|
+
"nodeType": "select",
|
|
74
|
+
"select": {
|
|
75
|
+
"draft": "This post is a draft",
|
|
76
|
+
"published": "This post is live",
|
|
77
|
+
"scheduled": "This post is scheduled",
|
|
78
|
+
"fallback": "Unknown status", // 可选
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
> 如果未声明 `fallback`,当提供的值与任何声明的情况不匹配时,最后声明的键将被作为后备项。这与 `cond()` 和 `gender()` 的约定相同。
|
|
86
|
+
|
|
87
|
+
### 类型安全
|
|
88
|
+
|
|
89
|
+
接受的参数是从声明的情况中推断出来的:
|
|
90
|
+
|
|
91
|
+
- 如果没有 `fallback`,则只接受声明的情况:输入错误将导致类型错误。
|
|
92
|
+
- 如果有 `fallback`,则接受任何字符串(后备项会处理不匹配的值),同时声明的情况仍然支持自动补全。
|
|
93
|
+
|
|
94
|
+
## 为什么不使用简单对象?
|
|
95
|
+
|
|
96
|
+
声明一个简单的对象并使用运行时值进行索引是很诱人的:
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
// ❌ 不要这样做
|
|
100
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
101
|
+
|
|
102
|
+
return <p>{publishStatus[publishType]}</p>;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Intlayer 编译器会分析您的源代码,以丢弃未使用的内容并压缩剩余的键。动态计算访问 (`obj[expr]`) 无法在静态时解析,因此整个分支会被标记为不透明(opaque):它将保留在包中,且其键保持不被压缩。
|
|
106
|
+
|
|
107
|
+
使用 `select()`,情况解析发生在函数调用内部,而不是属性访问。编译器看到的是单一静态字段访问,并像对待 `enu()`、`cond()` 或 `gender()` 一样精确优化该节点:
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
// ✅ 请这样做
|
|
111
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
112
|
+
|
|
113
|
+
return <p>{publishStatus(publishType)}</p>;
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## 使用基于选择的内容
|
|
117
|
+
|
|
118
|
+
<Tabs group="framework">
|
|
119
|
+
<Tab label="React" value="react">
|
|
120
|
+
|
|
121
|
+
要在 React 组件中使用基于选择的内容,请导入并使用 `react-intlayer` 包中的 `useIntlayer` 钩子。该钩子获取指定键的内容,并允许您传入一个值以选择适当的输出。
|
|
122
|
+
|
|
123
|
+
```tsx fileName="**/*.tsx" codeFormat={["typescript", "esm"]}
|
|
124
|
+
import type { FC } from "react";
|
|
125
|
+
import { useIntlayer } from "react-intlayer";
|
|
126
|
+
|
|
127
|
+
const PostStatus: FC = () => {
|
|
128
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<div>
|
|
132
|
+
<p>
|
|
133
|
+
{
|
|
134
|
+
/* 输出: This post is a draft */
|
|
135
|
+
publishStatus("draft")
|
|
136
|
+
}
|
|
137
|
+
</p>
|
|
138
|
+
<p>
|
|
139
|
+
{
|
|
140
|
+
/* 输出: This post is live */
|
|
141
|
+
publishStatus("published")
|
|
142
|
+
}
|
|
143
|
+
</p>
|
|
144
|
+
<p>
|
|
145
|
+
{
|
|
146
|
+
/* 输出: Unknown status */
|
|
147
|
+
publishStatus("Archived")
|
|
148
|
+
}
|
|
149
|
+
</p>
|
|
150
|
+
</div>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export default PostStatus;
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
</Tab>
|
|
158
|
+
<Tab label="Next.js" value="nextjs">
|
|
159
|
+
|
|
160
|
+
要在 Next.js 客户端组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
161
|
+
|
|
162
|
+
```tsx fileName="**/*.tsx" codeFormat={["typescript", "esm"]}
|
|
163
|
+
"use client";
|
|
164
|
+
|
|
165
|
+
import type { FC } from "react";
|
|
166
|
+
import { useIntlayer } from "next-intlayer";
|
|
167
|
+
|
|
168
|
+
const PostStatus: FC = () => {
|
|
169
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
170
|
+
|
|
171
|
+
return (
|
|
172
|
+
<div>
|
|
173
|
+
<p>{publishStatus("draft")}</p>
|
|
174
|
+
<p>{publishStatus("published")}</p>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export default PostStatus;
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
</Tab>
|
|
183
|
+
<Tab label="Vue" value="vue">
|
|
184
|
+
|
|
185
|
+
要在 Vue 组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
186
|
+
|
|
187
|
+
```vue fileName="**/*.vue"
|
|
188
|
+
<script setup lang="ts">
|
|
189
|
+
import { useIntlayer } from "vue-intlayer";
|
|
190
|
+
|
|
191
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
192
|
+
</script>
|
|
193
|
+
|
|
194
|
+
<template>
|
|
195
|
+
<div>
|
|
196
|
+
<p>{{ publishStatus("draft") }}</p>
|
|
197
|
+
<p>{{ publishStatus("published") }}</p>
|
|
198
|
+
</div>
|
|
199
|
+
</template>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
</Tab>
|
|
203
|
+
<Tab label="Svelte" value="svelte">
|
|
204
|
+
|
|
205
|
+
要在 Svelte 组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。可以通过 `$` 访问 store。示例如下:
|
|
206
|
+
|
|
207
|
+
```svelte fileName="**/*.svelte"
|
|
208
|
+
<script lang="ts">
|
|
209
|
+
import { useIntlayer } from "svelte-intlayer";
|
|
210
|
+
|
|
211
|
+
const content = useIntlayer("my_key");
|
|
212
|
+
</script>
|
|
213
|
+
|
|
214
|
+
<div>
|
|
215
|
+
<p>{$content.publishStatus("draft")}</p>
|
|
216
|
+
<p>{$content.publishStatus("published")}</p>
|
|
217
|
+
</div>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
</Tab>
|
|
221
|
+
<Tab label="Preact" value="preact">
|
|
222
|
+
|
|
223
|
+
要在 Preact 组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
224
|
+
|
|
225
|
+
```tsx fileName="**/*.tsx" codeFormat={["typescript", "esm"]}
|
|
226
|
+
import type { FC } from "preact";
|
|
227
|
+
import { useIntlayer } from "preact-intlayer";
|
|
228
|
+
|
|
229
|
+
const PostStatus: FC = () => {
|
|
230
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<div>
|
|
234
|
+
<p>{publishStatus("draft")}</p>
|
|
235
|
+
<p>{publishStatus("published")}</p>
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export default PostStatus;
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
</Tab>
|
|
244
|
+
<Tab label="Solid" value="solid">
|
|
245
|
+
|
|
246
|
+
要在 SolidJS 组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
247
|
+
|
|
248
|
+
```tsx fileName="**/*.tsx" codeFormat={["typescript", "esm"]}
|
|
249
|
+
import type { Component } from "solid-js";
|
|
250
|
+
import { useIntlayer } from "solid-intlayer";
|
|
251
|
+
|
|
252
|
+
const PostStatus: Component = () => {
|
|
253
|
+
const { publishStatus } = useIntlayer("my_key");
|
|
254
|
+
|
|
255
|
+
return (
|
|
256
|
+
<div>
|
|
257
|
+
<p>{publishStatus("draft")}</p>
|
|
258
|
+
<p>{publishStatus("published")}</p>
|
|
259
|
+
</div>
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export default PostStatus;
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
</Tab>
|
|
267
|
+
<Tab label="Angular" value="angular">
|
|
268
|
+
|
|
269
|
+
要在 Angular 组件中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
270
|
+
|
|
271
|
+
```typescript fileName="app.component.ts" codeFormat="typescript"
|
|
272
|
+
import { Component } from "@angular/core";
|
|
273
|
+
import { useIntlayer } from "angular-intlayer";
|
|
274
|
+
|
|
275
|
+
@Component({
|
|
276
|
+
selector: "app-post-status",
|
|
277
|
+
template: `
|
|
278
|
+
<div>
|
|
279
|
+
<p>{{ content().publishStatus("draft") }}</p>
|
|
280
|
+
<p>{{ content().publishStatus("published") }}</p>
|
|
281
|
+
</div>
|
|
282
|
+
`,
|
|
283
|
+
})
|
|
284
|
+
export class PostStatusComponent {
|
|
285
|
+
content = useIntlayer("my_key");
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
</Tab>
|
|
290
|
+
<Tab label="Vanilla JS" value="vanilla">
|
|
291
|
+
|
|
292
|
+
要在 `vanilla-intlayer` 中使用基于选择的内容,请通过 `useIntlayer` 钩子获取它。示例如下:
|
|
293
|
+
|
|
294
|
+
```typescript fileName="**/*.ts" codeFormat={["typescript", "esm"]}
|
|
295
|
+
import { installIntlayer, useIntlayer } from "vanilla-intlayer";
|
|
296
|
+
|
|
297
|
+
installIntlayer();
|
|
298
|
+
|
|
299
|
+
const content = useIntlayer("my_key").onChange((newContent) => {
|
|
300
|
+
document.getElementById("status")!.textContent =
|
|
301
|
+
newContent.publishStatus("draft");
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
// 初始渲染
|
|
305
|
+
document.getElementById("status")!.textContent = content.publishStatus("draft");
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
</Tab>
|
|
309
|
+
</Tabs>
|
|
310
|
+
|
|
311
|
+
## 将 Select 与其他节点结合使用
|
|
312
|
+
|
|
313
|
+
每个情况都包含一个完整的内容节点,因此 `select` 可以与 `t()`、`insert()`、`md()` 等结合使用:
|
|
314
|
+
|
|
315
|
+
```typescript fileName="**/*.content.ts" codeFormat="typescript"
|
|
316
|
+
import { insert, select, t, type Dictionary } from "intlayer";
|
|
317
|
+
|
|
318
|
+
const myPostContent = {
|
|
319
|
+
key: "my_key",
|
|
320
|
+
content: {
|
|
321
|
+
publishStatus: select({
|
|
322
|
+
draft: insert(
|
|
323
|
+
t({
|
|
324
|
+
en: "{{name}} saved a draft",
|
|
325
|
+
fr: "{{name}} a enregistré un brouillon",
|
|
326
|
+
zh: "{{name}} 保存了一份草稿",
|
|
327
|
+
})
|
|
328
|
+
),
|
|
329
|
+
published: insert(
|
|
330
|
+
t({
|
|
331
|
+
en: "{{name}} published the post",
|
|
332
|
+
fr: "{{name}} a publié l’article",
|
|
333
|
+
zh: "{{name}} 发布了帖子",
|
|
334
|
+
})
|
|
335
|
+
),
|
|
336
|
+
fallback: insert(
|
|
337
|
+
t({
|
|
338
|
+
en: "{{name}} updated the post",
|
|
339
|
+
fr: "{{name}} a mis à jour l’article",
|
|
340
|
+
zh: "{{name}} 更新了帖子",
|
|
341
|
+
})
|
|
342
|
+
),
|
|
343
|
+
}),
|
|
344
|
+
},
|
|
345
|
+
} satisfies Dictionary;
|
|
346
|
+
|
|
347
|
+
export default myPostContent;
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
publishStatus("draft")({ name: "Alice" }); // 输出: Alice 保存了一份草稿
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## 从 ICU `select` 迁移
|
|
355
|
+
|
|
356
|
+
使用 ICU `select` 参数的消息将被作为 `select` 节点导入:
|
|
357
|
+
|
|
358
|
+
```text
|
|
359
|
+
{publishType, select, draft {draft} published {published} other {Unknown}}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
变为
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
select(
|
|
366
|
+
{
|
|
367
|
+
draft: "draft",
|
|
368
|
+
published: "published",
|
|
369
|
+
fallback: "Unknown",
|
|
370
|
+
},
|
|
371
|
+
"publishType"
|
|
372
|
+
);
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
ICU 中的 `other` 情况被重命名为 `fallback`,这是 Intlayer 用于所有未匹配情况的规范名称。第二个参数记录了 ICU 变量的名称,以便在导出时可以将消息完全恢复为原来的 ICU 字符串。
|
|
376
|
+
|
|
377
|
+
> 如果 ICU `select` 的情况是性别值(`male` / `female` / `other`),它将作为 [`gender`](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/dictionary/gender.md) 节点导入。
|
|
378
|
+
|
|
379
|
+
## 其他资源
|
|
380
|
+
|
|
381
|
+
有关配置和使用的更多详细信息,请参阅以下资源:
|
|
382
|
+
|
|
383
|
+
- [Intlayer CLI 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/cli/index.md)
|
|
384
|
+
- [Intlayer React 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_with_create_react_app.md)
|
|
385
|
+
- [Intlayer Next.js 文档](https://github.com/aymericzip/intlayer/blob/main/docs/docs/zh/intlayer_with_nextjs_15.md)
|
|
386
|
+
|
|
387
|
+
这些资源深入探讨了在不同环境和框架中配置和使用 Intlayer 的方法。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/docs",
|
|
3
|
-
"version": "9.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer documentation",
|
|
6
6
|
"keywords": [
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
"watch": "webpack --config ./webpack.config.ts --watch"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@intlayer/config": "9.0
|
|
77
|
-
"@intlayer/core": "9.0
|
|
78
|
-
"@intlayer/types": "9.0
|
|
76
|
+
"@intlayer/config": "9.1.0",
|
|
77
|
+
"@intlayer/core": "9.1.0",
|
|
78
|
+
"@intlayer/types": "9.1.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@intlayer/api": "9.0
|
|
82
|
-
"@intlayer/cli": "9.0
|
|
83
|
-
"@types/node": "26.1.
|
|
81
|
+
"@intlayer/api": "9.1.0",
|
|
82
|
+
"@intlayer/cli": "9.1.0",
|
|
83
|
+
"@types/node": "26.1.2",
|
|
84
84
|
"@utils/ts-config": "1.0.4",
|
|
85
85
|
"@utils/ts-config-types": "1.0.4",
|
|
86
86
|
"@utils/tsdown-config": "1.0.4",
|
|
@@ -1353,6 +1353,26 @@ export const docsEntry = {
|
|
|
1353
1353
|
vi: readLocale('dictionary/plurial.md', 'vi'),
|
|
1354
1354
|
uk: readLocale('dictionary/plurial.md', 'uk'),
|
|
1355
1355
|
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
1356
|
+
'./docs/en/dictionary/select.md': {
|
|
1357
|
+
en: readLocale('dictionary/select.md', 'en'),
|
|
1358
|
+
ru: readLocale('dictionary/select.md', 'ru'),
|
|
1359
|
+
ja: readLocale('dictionary/select.md', 'ja'),
|
|
1360
|
+
fr: readLocale('dictionary/select.md', 'fr'),
|
|
1361
|
+
ko: readLocale('dictionary/select.md', 'ko'),
|
|
1362
|
+
zh: readLocale('dictionary/select.md', 'zh'),
|
|
1363
|
+
es: readLocale('dictionary/select.md', 'es'),
|
|
1364
|
+
de: readLocale('dictionary/select.md', 'de'),
|
|
1365
|
+
ar: readLocale('dictionary/select.md', 'ar'),
|
|
1366
|
+
it: readLocale('dictionary/select.md', 'it'),
|
|
1367
|
+
'en-GB': readLocale('dictionary/select.md', 'en-GB'),
|
|
1368
|
+
pt: readLocale('dictionary/select.md', 'pt'),
|
|
1369
|
+
hi: readLocale('dictionary/select.md', 'hi'),
|
|
1370
|
+
tr: readLocale('dictionary/select.md', 'tr'),
|
|
1371
|
+
pl: readLocale('dictionary/select.md', 'pl'),
|
|
1372
|
+
id: readLocale('dictionary/select.md', 'id'),
|
|
1373
|
+
vi: readLocale('dictionary/select.md', 'vi'),
|
|
1374
|
+
uk: readLocale('dictionary/select.md', 'uk'),
|
|
1375
|
+
} as unknown as Record<LocalesValues, Promise<string>>,
|
|
1356
1376
|
'./docs/en/dictionary/translation.md': {
|
|
1357
1377
|
en: readLocale('dictionary/translation.md', 'en'),
|
|
1358
1378
|
ru: readLocale('dictionary/translation.md', 'ru'),
|