use-intl 3.10.0 → 3.11.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.
Files changed (2) hide show
  1. package/README.md +4 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Features
6
6
 
7
- Internationalization is an essential part of the user experience. `use-intl` gives you everything you need to get language subtleties right and has always got your back whenever you need to fine-tune a translation.
7
+ Internationalization (i18n) is an essential part of the user experience, therefore `use-intl` gives you all the parts you need to get language nuances right.
8
8
 
9
9
  - 🌟 **ICU message syntax**: Localize your messages with interpolation, cardinal & ordinal plurals, enum-based label selection and rich text.
10
10
  - 📅 **Dates, times & numbers**: Apply appropriate formatting without worrying about server/client differences like time zones.
@@ -14,11 +14,9 @@ Internationalization is an essential part of the user experience. `use-intl` giv
14
14
 
15
15
  ## What does it look like?
16
16
 
17
- This library is based on the premise that messages can be grouped by namespaces (typically a component name).
18
-
19
17
  ```jsx
20
18
  // UserProfile.tsx
21
- import {useTranslations} from 'next-intl';
19
+ import {useTranslations} from 'use-intl';
22
20
 
23
21
  export default function UserProfile({user}) {
24
22
  const t = useTranslations('UserProfile');
@@ -52,6 +50,7 @@ export default function UserProfile({user}) {
52
50
 
53
51
  1. `npm install use-intl`
54
52
  2. Add the provider
53
+ 3. Use internationalization in components
55
54
 
56
55
  ```jsx
57
56
  import {IntlProvider, useTranslations} from 'use-intl';
@@ -81,6 +80,4 @@ function App({user}) {
81
80
 
82
81
  Have a look at [the minimal setup example](https://github.com/amannn/next-intl/tree/main/examples/example-use-intl) to explore a working app.
83
82
 
84
- ## Usage
85
-
86
- Please refer to the [`next-intl` usage docs](https://next-intl-docs.vercel.app/docs/usage) for more advanced usage, but note that you should import from `use-intl` instead of `next-intl`.
83
+ ### [→ Read the docs](https://next-intl-docs.vercel.app/docs/environments/core-library)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-intl",
3
- "version": "3.10.0",
3
+ "version": "3.11.1",
4
4
  "sideEffects": false,
5
5
  "author": "Jan Amann <jan@amann.work>",
6
6
  "description": "Minimal, but complete solution for managing internationalization in React apps.",
@@ -93,5 +93,5 @@
93
93
  "limit": "12.575 kB"
94
94
  }
95
95
  ],
96
- "gitHead": "9dd129cdd72c8ac6704b2c9776d018e8db7a758e"
96
+ "gitHead": "78f88d1493eb796498b7fb2c986536ac49cffda0"
97
97
  }