i18nya 0.1.1 → 0.1.2

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.
@@ -27,7 +27,7 @@ export default i18nya;
27
27
  Then in `astro.config.mjs`:
28
28
 
29
29
  ```ts
30
- import i18nya from "./i18n";
30
+ import i18nya from "./src/i18n";
31
31
  import astro_i18nya from "astro-i18nya";
32
32
 
33
33
  export default defineConfig({
@@ -36,6 +36,16 @@ export default defineConfig({
36
36
  });
37
37
  ```
38
38
 
39
+ Then for all pages in `src/pages/[lang]/*.astro`:
40
+
41
+ ```ts
42
+ import i18nya, { makeT } from "../../i18n.ts";
43
+ import { makeGetStaticPaths } from "astro-i18nya";
44
+ const t = makeT(Astro.params.lang);
45
+ // generate paths only for languages in your `langs/` folder!
46
+ export const getStaticPaths = makeGetStaticPaths(i18nya);
47
+ ```
48
+
39
49
  ## Trans
40
50
 
41
51
  ```tsx
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-i18nya",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Astro integration for i18nya: i18n as small as a cat's paw",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,9 @@
14
14
  "url": "git+https://github.com/FyraLabs/i18nya.git"
15
15
  },
16
16
  "jest": {
17
- "testPathIgnorePatterns": ["<rootDir>/dist"]
17
+ "testPathIgnorePatterns": [
18
+ "<rootDir>/dist"
19
+ ]
18
20
  },
19
21
  "keywords": [
20
22
  "astro",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18nya",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "i18n as small as a cat's paw",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",