@aparte/locale-fr 0.2.0-alpha.0 → 0.4.0-alpha.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.
Files changed (2) hide show
  1. package/README.md +10 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -14,6 +14,16 @@ import { fr } from '@aparte/locale-fr';
14
14
  AparteConfig.setLocale(fr);
15
15
  ```
16
16
 
17
+ To toggle back and forth at runtime (e.g. a language switcher), use
18
+ `resetLocale()` to return to the built-in English:
19
+
20
+ ```ts
21
+ function setLanguage(lang: 'fr' | 'en') {
22
+ if (lang === 'fr') AparteConfig.setLocale(fr);
23
+ else AparteConfig.resetLocale();
24
+ }
25
+ ```
26
+
17
27
  `@aparte/core` is a **peer dependency**. See the [Localization guide](https://github.com/apartejs/aparte)
18
28
  for the full `AparteLocale` surface.
19
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aparte/locale-fr",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.4.0-alpha.0",
4
4
  "description": "French locale for aparté — pass to AparteConfig.setLocale() (core ships English by default).",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -24,13 +24,13 @@
24
24
  "node": ">=18"
25
25
  },
26
26
  "peerDependencies": {
27
- "@aparte/core": "0.2.0-alpha.0"
27
+ "@aparte/core": "0.4.0-alpha.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "typescript": "^5.4.0",
31
31
  "vite": "^6.0.0",
32
32
  "vite-plugin-dts": "^4.5.4",
33
- "@aparte/core": "0.2.0-alpha.0"
33
+ "@aparte/core": "0.4.0-alpha.0"
34
34
  },
35
35
  "keywords": [
36
36
  "aparte",