sheet-i18n 1.10.8 → 1.10.10

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.
Files changed (2) hide show
  1. package/README.md +5 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -110,6 +110,7 @@ export const i18nStore = new I18nStore({
110
110
  // jp: () => import('./jp.json'),
111
111
  // cn: () => import('./cn.json'),
112
112
  // },
113
+ // preload: ['ko', 'en'],
113
114
  });
114
115
  ```
115
116
 
@@ -178,6 +179,7 @@ Import it from `@sheet-i18n/core`, then pass the created store to `createI18nCon
178
179
  | `defaultLocale` | string | ✅ | Default locale to use when no match is found. Must be included in `supportedLocales`. |
179
180
  | localeSet | Record<string, object> | | _(Static Loading Option)_ Preload all translation data for each locale in memory. Keys must match `supportedLocales`. |
180
181
  | dynamicLoaders | Record<string, () => Promise<any>> | | _(Recommended for large locale sets)_ Dynamically load translation data on demand, reducing initial bundle size. |
182
+ | preload | string[] | | Locales to preload eagerly. This option is available only when `dynamicLoaders` is defined. |
181
183
  | typeSafe | boolean | | Enable strict key checking and autocompletion (default: `false`). |
182
184
  | |
183
185
 
@@ -229,10 +231,12 @@ export const i18nStore = new I18nStore({
229
231
  fr: () => import('./fr.json'),
230
232
  ko: () => import('./ko.json'),
231
233
  },
234
+ preload: ['en'],
232
235
  });
233
236
  ```
234
237
 
235
238
  💡 When both `localeSet` and `dynamicLoaders` are defined, sheet-i18n **automatically merges** both sources — static data loads immediately, while dynamic data supplements on-demand.
239
+ `preload` can be used only together with `dynamicLoaders`, and its values must be locale keys that exist in `dynamicLoaders`.
236
240
 
237
241
  ---
238
242
 
@@ -264,6 +268,7 @@ export const i18nStore = new I18nStore({
264
268
  // jp: () => import('./jp.json'),
265
269
  // cn: () => import('./cn.json'),
266
270
  // },
271
+ // preload: ['ko'],
267
272
  });
268
273
  ```
269
274
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sheet-i18n",
3
3
  "description": "Core i18n toolchain for sheet-i18n: configuration types and server-side importer for Google Sheets workflows.",
4
- "version": "1.10.8",
4
+ "version": "1.10.10",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/chltjdrhd777/sheet-i18n"
@@ -43,7 +43,7 @@
43
43
  "devDependencies": {
44
44
  "tsup": "^6.0.0",
45
45
  "typescript": "^5.0.0",
46
- "@sheet-i18n/typescript-config": "1.8.4"
46
+ "@sheet-i18n/typescript-config": "1.8.6"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsup",