@orderly.network/i18n 2.12.0 → 2.12.1
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/README.md +27 -314
- package/bin/cli.js +92 -37
- package/dist/{constant-D_rlt5w0.d.mts → constant-DkvDyddr.d.mts} +12 -40
- package/dist/{constant-D_rlt5w0.d.ts → constant-DkvDyddr.d.ts} +12 -40
- package/dist/constant.d.mts +1 -1
- package/dist/constant.d.ts +1 -1
- package/dist/constant.js.map +1 -1
- package/dist/constant.mjs.map +1 -1
- package/dist/index.d.mts +84 -20
- package/dist/index.d.ts +84 -20
- package/dist/index.js +138 -107
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +129 -106
- package/dist/index.mjs.map +1 -1
- package/dist/locale.csv +7 -105
- package/dist/locales/de.json +7 -37
- package/dist/locales/en.json +7 -37
- package/dist/locales/es.json +7 -37
- package/dist/locales/fr.json +7 -37
- package/dist/locales/id.json +7 -37
- package/dist/locales/it.json +7 -37
- package/dist/locales/ja.json +7 -37
- package/dist/locales/ko.json +7 -37
- package/dist/locales/nl.json +7 -37
- package/dist/locales/pl.json +7 -37
- package/dist/locales/pt.json +7 -37
- package/dist/locales/ru.json +7 -37
- package/dist/locales/tc.json +7 -37
- package/dist/locales/tr.json +7 -37
- package/dist/locales/uk.json +7 -37
- package/dist/locales/vi.json +7 -37
- package/dist/locales/zh.json +7 -37
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +25 -50
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs +25 -50
- package/dist/utils.mjs.map +1 -1
- package/docs/guide/AGENTS.md +109 -0
- package/docs/guide/cli.md +133 -0
- package/docs/guide/examples.md +455 -0
- package/docs/guide/exports.md +14 -0
- package/docs/guide/integration.md +223 -0
- package/docs/guide/utils.md +14 -0
- package/package.json +13 -11
- package/{script → scripts}/copyLocales.js +1 -1
- package/scripts/filterLocaleKeys.js +127 -0
- package/{script → scripts}/generateCsv.js +3 -3
- package/{script → scripts}/utils.js +20 -14
- /package/{script → scripts}/csv2json.js +0 -0
- /package/{script → scripts}/diffCsv.js +0 -0
- /package/{script → scripts}/fillJson.js +0 -0
- /package/{script → scripts}/generateEnJson.js +0 -0
- /package/{script → scripts}/generateMissingKeys.js +0 -0
- /package/{script → scripts}/json-csv-converter.js +0 -0
- /package/{script → scripts}/json2csv.js +0 -0
- /package/{script → scripts}/mergeJson.js +0 -0
- /package/{script → scripts}/separateJson.js +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Agent integration guide
|
|
2
|
+
|
|
3
|
+
**Audience:** coding agents and automation integrating `@orderly.network/i18n`.
|
|
4
|
+
|
|
5
|
+
This file is a **routing layer**: invariants, scenario → approach, and anti-patterns. For full props, effects, and copy-paste recipes, follow the links under [Further reading](#further-reading).
|
|
6
|
+
|
|
7
|
+
### Required companion docs (implementation)
|
|
8
|
+
|
|
9
|
+
When this guide is used to **implement**, **migrate**, or **modify** localization (e.g. wire `LocaleProvider`, `AsyncResources`, HTTP `backend`, extend keys, or language switching), **always** bring **both** companion files into context **together with** this one — **do not** implement from `AGENTS.md` alone.
|
|
10
|
+
|
|
11
|
+
| File | Purpose |
|
|
12
|
+
| ---------------------------------- | ---------------------------------------------------------------------------- |
|
|
13
|
+
| [integration.md](./integration.md) | Props, effects, loading strategies, `registerResources`, external resources |
|
|
14
|
+
| [examples.md](./examples.md) | End-to-end recipes (Vite, Next/webpack, HTTP `public/`, sync maps, URL sync) |
|
|
15
|
+
|
|
16
|
+
**For coding agents:** Before writing or editing integration code, **read** `integration.md` and `examples.md` (same directory as this file). In Cursor-style UIs, attach **`@integration.md`** and **`@examples.md`** alongside **`@AGENTS.md`**, or attach the whole **`docs/guide`** folder if supported.
|
|
17
|
+
|
|
18
|
+
## Default bundled integration (preferred)
|
|
19
|
+
|
|
20
|
+
When the app **bundles** Orderly SDK locale JSON together with app `extend` JSON (the common case), **default to** `LocaleProvider` with **`resources` typed as `AsyncResources`**. For **new** integrations, do **not** default to HTTP `backend` or a fully static `Resources` map unless product or ops explicitly require runtime-only JSON (CDN / `public/` without bundling) or a sync map.
|
|
21
|
+
|
|
22
|
+
**Existing code uses HTTP `backend`:** If the target project already has `backend={{ loadPath }}` (or equivalent) and this guide is in scope, treat the **intent as refactoring** to **`AsyncResources`**: drop the HTTP loader for those same locale bundles, implement the async loader per the bundler row below (merge SDK + extend per [Examples](./examples.md)), and keep **one** primary loading path ([Integration — loading strategies](./integration.md#loading-strategies-quick-reference)). Only **keep** `backend` when the user explicitly asks to stay on HTTP-only loading.
|
|
23
|
+
|
|
24
|
+
The **same** `AsyncResources` API applies everywhere; only the **loader implementation** depends on the bundler:
|
|
25
|
+
|
|
26
|
+
| Bundler | How to load JSON inside `AsyncResources` | Recipe |
|
|
27
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
28
|
+
| **Vite** (or compatible) | **`import.meta.glob`** with **string-literal** patterns only | [Async resources (Vite)](./examples.md#async-resources-vite) |
|
|
29
|
+
| **Next.js / webpack** | **Explicit `import()`** per locale (or equivalent static analysis) — **never** `import.meta.glob` | [Async resources (Next.js and webpack)](./examples.md#async-resources-nextjs-and-webpack) |
|
|
30
|
+
|
|
31
|
+
**Agent workflow:** Infer the toolchain from `vite.config.*`, `next.config.*`, or `package.json`, then follow the matching row. If unclear, ask or inspect the build tool before generating loader code.
|
|
32
|
+
|
|
33
|
+
## Package responsibility
|
|
34
|
+
|
|
35
|
+
`@orderly.network/i18n` provides internationalization for Orderly apps: locale types, constants, React context and providers, a shared **i18next** instance, optional HTTP `Backend` loading, and path/locale helpers. It does **not** ship UI components; consumers use types, hooks, and providers.
|
|
36
|
+
|
|
37
|
+
## Package surface (quick reference)
|
|
38
|
+
|
|
39
|
+
| Import | Role |
|
|
40
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
41
|
+
| `@orderly.network/i18n` | Main entry: `LocaleProvider`, `ExternalLocaleProvider`, `LanguageProvider`, `registerDefaultResource`, `registerResources`, `Backend`, hooks (`useTranslation`, `useLocaleCode`, `useRegisterExternalResources`), `i18n`, types, baseline `en` messages, re-exports from `react-i18next` / `i18next` as applicable |
|
|
42
|
+
| `@orderly.network/i18n/locales/*` | Built-in locale JSON |
|
|
43
|
+
| `@orderly.network/i18n/constant` | e.g. `LocaleEnum`, `defaultLanguages`, `defaultNS` |
|
|
44
|
+
| `@orderly.network/i18n/utils` | Path and locale helpers — see [Utils](./utils.md) |
|
|
45
|
+
|
|
46
|
+
**Default i18n namespace:** `translation` (`defaultNS`). Details: [exports](./exports.md).
|
|
47
|
+
|
|
48
|
+
## Invariants (do not violate)
|
|
49
|
+
|
|
50
|
+
1. **Singleton `i18n`:** `LocaleProvider` composes `LanguageProvider` and `I18nextProvider` around the package’s **single** `i18n` instance. Integrations should not create a parallel i18next stack for the same tree unless you deliberately use `createI18nInstance` / separate trees (advanced; not the default path).
|
|
51
|
+
|
|
52
|
+
2. **`AsyncResources` and `ns`:** Type is `(lang, ns) => Promise<Record<string, string>>`. When loading goes through **`registerResources`** (from `LocaleProvider`, `ExternalLocaleProvider`, or `useRegisterExternalResources`), the implementation calls `resources(localeCode, defaultNS)` — the second argument is **always** `defaultNS` (`translation`), not an arbitrary namespace. Use the `ns` parameter only if you build URLs or need it for documentation; for multiple i18next namespaces, use the i18n API directly.
|
|
53
|
+
|
|
54
|
+
3. **One primary loading strategy per app:** Prefer exactly one of — HTTP `backend` · static or async `resources` · controlled `locale` + `resource` — to avoid overlapping bundles and double registration. See [Integration §1](./integration.md#1-wrap-your-app-with-localeprovider).
|
|
55
|
+
|
|
56
|
+
4. **Custom keys:** Use the `extend.` prefix for app-specific keys so they stay distinct from SDK keys and align with CLI tooling (e.g. `separateJson`). See [Integration §3](./integration.md#3-extending-locale-files).
|
|
57
|
+
|
|
58
|
+
5. **`useRegisterExternalResources`:** Pass a **stable** `resources` reference (`useCallback` for async loaders; module scope or `useMemo` for static maps) to avoid unnecessary re-registration.
|
|
59
|
+
|
|
60
|
+
## Decision table (goal → approach → doc)
|
|
61
|
+
|
|
62
|
+
| Goal | Approach | Read |
|
|
63
|
+
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
|
64
|
+
| Vite (or compatible bundler) — merge SDK base JSON + app `extend` JSON | `LocaleProvider` + `resources` as **`AsyncResources`**, often with `import.meta.glob` (literal patterns only) | [Examples — Async resources (Vite)](./examples.md#async-resources-vite) |
|
|
65
|
+
| Next.js / webpack — same merge idea | Explicit per-locale `import()`; **do not** rely on `import.meta.glob` | [Examples — Next.js and webpack](./examples.md#async-resources-nextjs-and-webpack) |
|
|
66
|
+
| Serve JSON from `public/` (or CDN) via URLs only (no bundled merge) | `backend={{ loadPath }}` on `LocaleProvider` — **`public/` / CDN files are maintained by the host app** (manual copy or script / Husky); the package does **not** write them | [Examples — HTTP backend](./examples.md#http-backend) |
|
|
67
|
+
| All locales in a static in-memory map | `resources` as static `Resources` | [Examples — Sync resources](./examples.md#sync-resources) |
|
|
68
|
+
| Narrow language picker to a subset | `supportedLanguages` / `languages` via `LanguageProvider` props | [Examples — Custom languages](./examples.md#custom-languages) |
|
|
69
|
+
| Sync locale with URL (e.g. `/en/...`) | `onLanguageChanged` (and related routing) | [Examples — URL sync](./examples.md#onlanguagechanged-url-sync) |
|
|
70
|
+
| Inject one flat bundle for one language (controlled) | `locale` + `resource` (only when `resources` is unset) | [Integration §1](./integration.md#1-wrap-your-app-with-localeprovider) |
|
|
71
|
+
| Host / external bundles without extra wrapper | `ExternalLocaleProvider`, or `useRegisterExternalResources` under `LocaleProvider` — same **`registerResources`** path as `LocaleProvider.resources` | [Integration §4](./integration.md#4-integrate-external-resources) |
|
|
72
|
+
| Merge English keys before first paint (reduce raw-key flicker) | `registerDefaultResource` at bootstrap (before React mount) | [Integration §4](./integration.md#registerdefaultresource) |
|
|
73
|
+
|
|
74
|
+
## Do not
|
|
75
|
+
|
|
76
|
+
- Use **`import.meta.glob`** on **Next.js / webpack** for locale loading — use explicit `import()` patterns from [Examples](./examples.md#async-resources-nextjs-and-webpack).
|
|
77
|
+
- Pass **non-literal** strings to `import.meta.glob` — bundlers must see literal glob patterns at build time ([Examples — Vite](./examples.md#async-resources-vite)).
|
|
78
|
+
- Combine **HTTP `backend`** with heavy overlapping **`resources`** for the same namespaces without understanding merge order — prefer one primary strategy ([Integration](./integration.md#loading-strategies-quick-reference)). When migrating **from** `backend` **to** `AsyncResources`, remove `backend` for the replaced bundles instead of stacking both.
|
|
79
|
+
- Assume **`loadPath` URLs work without placing files** — copy or sync SDK `dist/locales` (and extend JSON) to `public/` or CDN **yourself**, or automate with a script / Husky ([Examples — HTTP backend](./examples.md#http-backend)).
|
|
80
|
+
- Assume **`AsyncResources`** receives arbitrary `ns` from `registerResources` — second argument is always **`translation`** when going through that path ([Integration](./integration.md#locale-only-props)).
|
|
81
|
+
- Omit a **stable** reference for `useRegisterExternalResources` — causes redundant work ([Integration §4](./integration.md#useregisterexternalresources)).
|
|
82
|
+
|
|
83
|
+
## Minimal snippet
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { LocaleProvider } from "@orderly.network/i18n";
|
|
87
|
+
|
|
88
|
+
export function App() {
|
|
89
|
+
return (
|
|
90
|
+
<LocaleProvider>
|
|
91
|
+
<YourApp />
|
|
92
|
+
</LocaleProvider>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
English is available by default; multiple locales, bundling, HTTP loading, and CLI workflows are in [Examples](./examples.md) and [Integration](./integration.md).
|
|
98
|
+
|
|
99
|
+
## Further reading (order)
|
|
100
|
+
|
|
101
|
+
1. [Integration](./integration.md) — props, effects, loading strategies, external resources.
|
|
102
|
+
2. [Examples](./examples.md) — end-to-end recipes (Vite, Next/webpack, HTTP, sync, URL sync).
|
|
103
|
+
3. [Exports](./exports.md) — entry points and hooks summary.
|
|
104
|
+
4. [Utils](./utils.md) — `parseI18nLang`, `generatePath`, etc.
|
|
105
|
+
5. [CLI](./cli.md) — CSV/JSON tooling for translation workflows.
|
|
106
|
+
|
|
107
|
+
## Search keywords
|
|
108
|
+
|
|
109
|
+
`@orderly.network/i18n`, `LocaleProvider`, `ExternalLocaleProvider`, `LanguageProvider`, `I18nProvider`, `useTranslation`, `useLocaleCode`, `useRegisterExternalResources`, `useLanguageContext`, `AsyncResources`, `bundled`, `migrate`, `refactor`, `Resources`, `registerResources`, `registerDefaultResource`, `Backend`, `loadPath`, `public`, `Husky`, `copyLocales`, `defaultNS`, `translation`, `i18next`, `react-i18next`, `LocaleCode`, `extend.`, `import.meta.glob`, `import()`, `importLocaleJsonModule`, `Vite`, `Next.js`, `webpack`, `integration.md`, `examples.md`, `docs/guide`
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# CLI
|
|
2
|
+
|
|
3
|
+
The `i18n` binary ships with `@orderly.network/i18n`. It helps maintain locale files: CSV/JSON conversion, CSV diffs, merging default and `extend/` JSON, splitting by key prefix, and filtering keys. The binary name is **`i18n`** (see `package.json` `bin`).
|
|
4
|
+
|
|
5
|
+
**Equivalent invocations** (use whichever fits your setup):
|
|
6
|
+
|
|
7
|
+
- `pnpm exec i18n` — when the package is a dependency in a pnpm workspace
|
|
8
|
+
- `npx i18n` — when installed locally (`node_modules/.bin`)
|
|
9
|
+
- `npx @orderly.network/i18n` — runs the published package without a prior install
|
|
10
|
+
|
|
11
|
+
Below, examples use `npx @orderly.network/i18n`; substitute `pnpm exec i18n` or `npx i18n` as needed.
|
|
12
|
+
|
|
13
|
+
**Help:** run `npx @orderly.network/i18n --help` for the command list, or `npx @orderly.network/i18n <command> --help` for a subcommand (e.g. positionals and flags for `csv2json`).
|
|
14
|
+
|
|
15
|
+
**Audience:** Paths like `./locales` are examples. When maintaining **this package**, commands are often run from `packages/i18n`; when using the CLI **inside another repo**, point arguments at your project’s directories. `filterKeys` defaults to this package’s `locales` folder relative to the installed package unless you pass `--locales-dir`.
|
|
16
|
+
|
|
17
|
+
## Command reference
|
|
18
|
+
|
|
19
|
+
| Command | Purpose | Arguments |
|
|
20
|
+
| -------------- | -------------------------------------------------- | -------------------------------------------------------------------- |
|
|
21
|
+
| `csv2json` | CSV → multiple per-locale JSON files | `<input.csv> <outputDir>` |
|
|
22
|
+
| `json2csv` | Directory of JSON → one CSV | `<inputDir> <output.csv>` |
|
|
23
|
+
| `diffcsv` | Compare two CSV files | `<oldFile> <newFile>` |
|
|
24
|
+
| `generateCsv` | JSON directory → CSV (e.g. release / template) | `<inputDir> <output.csv>` |
|
|
25
|
+
| `fillJson` | Fill a locale JSON from the English key set | `<input.json> <output.json>` |
|
|
26
|
+
| `separateJson` | Split keys by prefix into root vs `extend/` | `<inputDir> <outputDir> <keyPrefix>` (prefix may be comma-separated) |
|
|
27
|
+
| `mergeJson` | Merge root + `extend/` JSON per locale | `<inputDir> <outputDir>` |
|
|
28
|
+
| `filterKeys` | Keep or remove keys by prefix in locale JSON files | See [filterKeys](#filterkeys) |
|
|
29
|
+
|
|
30
|
+
## Typical workflows
|
|
31
|
+
|
|
32
|
+
- **Export for translators:** `generateCsv ./locales ./dist/locale.csv` → translate the CSV → `csv2json ./dist/locale.csv ./dist/locales` to get updated JSON.
|
|
33
|
+
- **Extend vs main bundles:** Use `separateJson` / `mergeJson` when you keep SDK strings and `extend.*` keys in separate files; align with the `extend/` layout described in [Integration guide](./integration.md).
|
|
34
|
+
- **Fill missing keys in a locale:** `fillJson` against a partial locale file to align keys with the built-in English set.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### csv2json
|
|
39
|
+
|
|
40
|
+
Convert one locale CSV into multiple locale JSON files under `<outputDir>`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx @orderly.network/i18n csv2json <input> <outputDir>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Example:** `npx @orderly.network/i18n csv2json ./dist/locale.csv ./dist/locales`
|
|
47
|
+
|
|
48
|
+
### json2csv
|
|
49
|
+
|
|
50
|
+
Collect all `*.json` in `<inputDir>` and write a single CSV to `<output>`.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npx @orderly.network/i18n json2csv <inputDir> <output>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Example:** `npx @orderly.network/i18n json2csv ./locales ./dist/locale.csv`
|
|
57
|
+
|
|
58
|
+
### diffcsv
|
|
59
|
+
|
|
60
|
+
Compare two locale CSV files (useful for reviewing translation updates).
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx @orderly.network/i18n diffcsv <oldFile> <newFile>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Example:** `npx @orderly.network/i18n diffcsv ./dist/locale1.csv ./dist/locale2.csv`
|
|
67
|
+
|
|
68
|
+
### generateCsv
|
|
69
|
+
|
|
70
|
+
Build a locale CSV from JSON files in `<inputDir>`. Often used for this package’s own `locales` during build or release.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npx @orderly.network/i18n generateCsv <inputDir> <output>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Example:** `npx @orderly.network/i18n generateCsv ./locales ./dist/locale.csv`
|
|
77
|
+
|
|
78
|
+
### fillJson
|
|
79
|
+
|
|
80
|
+
Produce a new JSON file with the **same keys as the built-in English set**, taking values from `<input>` (missing keys become empty). Use to backfill a locale from a template or another language file.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npx @orderly.network/i18n fillJson <input> <output>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Example:** `npx @orderly.network/i18n fillJson ./src/locale/zh.json ./dist/locale/zh.json`
|
|
87
|
+
|
|
88
|
+
### separateJson
|
|
89
|
+
|
|
90
|
+
For each locale JSON in `<inputDir>`, split keys by prefix: keys **starting with** the given prefix string(s) go under `<outputDir>/extend/`, the rest stay at `<outputDir>`. The third argument is one or more **prefix strings** separated by commas (e.g. `extend` matches `extend.foo`; `extend,trading` would match both prefixes).
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npx @orderly.network/i18n separateJson <inputDir> <outputDir> <keyPrefix>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Example:** `npx @orderly.network/i18n separateJson ./locales ./dist/locales extend`
|
|
97
|
+
|
|
98
|
+
### mergeJson
|
|
99
|
+
|
|
100
|
+
Merge “default” JSON files and matching files under `extend/` inside `<inputDir>` into one file per locale in `<outputDir>`. The input layout must match what `separateJson` (or your pipeline) produces.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx @orderly.network/i18n mergeJson <inputDir> <outputDir>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Example:** `npx @orderly.network/i18n mergeJson ./locales ./dist/locales`
|
|
107
|
+
|
|
108
|
+
### filterKeys
|
|
109
|
+
|
|
110
|
+
Keep or remove keys whose names start with `--prefix`. By default, operates on the package’s `locales` directory next to the CLI in the installed package (equivalent to `packages/i18n/locales` in this monorepo). Override with `--locales-dir` for your app’s JSON directory.
|
|
111
|
+
|
|
112
|
+
You must pass **exactly one** of `--keep` / `-k` or `--remove` / `-r`.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx @orderly.network/i18n filterKeys (--keep | -k | --remove | -r) --prefix <prefix> [--locales-dir <dir>]
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| Option | Description |
|
|
119
|
+
| ---------------- | ---------------------------------------------------------------- |
|
|
120
|
+
| `--keep`, `-k` | Keep only keys that start with the prefix. |
|
|
121
|
+
| `--remove`, `-r` | Remove keys that start with the prefix. |
|
|
122
|
+
| `--prefix` | (Required) Prefix to match (e.g. `trading.` or `trading`). |
|
|
123
|
+
| `--locales-dir` | Directory of locale `*.json` files (default: package `locales`). |
|
|
124
|
+
|
|
125
|
+
**Examples:**
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
npx @orderly.network/i18n filterKeys --keep --prefix trading.
|
|
129
|
+
npx @orderly.network/i18n filterKeys -r --prefix trading.
|
|
130
|
+
npx @orderly.network/i18n filterKeys -k --prefix extend. --locales-dir ./my-locales
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
See also: [Integration guide](./integration.md) · [Examples](./examples.md)
|