Skip to content

Commit

Permalink
fix: add usage to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Oct 20, 2024
1 parent dba0dd7 commit 20aaca1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,20 @@ const i18nOptions = {
const i18n = new I18n(i18nOptions)
```

... later
... then in your app

```jsx
<label>{i18n.get('addOption')}</label>
```

### Add a Language after initialization

```javascript
i18n.addLanguage('fr-FR', {
addOption: 'Ajouter une option',
})
```

### Example `.lang` file

```txt
Expand Down

0 comments on commit 20aaca1

Please sign in to comment.