Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mathieuprog/solid-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuprog committed Nov 6, 2022
2 parents 9aae1c2 + 692b56c commit 51ac01c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ First, add your app's translations:
import { addTranslations } from 'solid-compose';

addTranslations('en' {
"hello": "hello, {{ name }}!"
"hello": "Hello, {{ name }}!"
});

addTranslations('fr' {
"hello": "bonjour, {{ name }} !",
"hello": "Bonjour, {{ name }} !",
});

// from JSON files
Expand Down Expand Up @@ -60,7 +60,7 @@ createI18nPrimitive({
```typescript
addTranslations('fr', {
"welcome": {
"hello": "bonjour !"
"hello": "Bonjour !"
}
});

Expand All @@ -69,7 +69,7 @@ createI18nPrimitive({
keySeparator: '.'
});

translate('welcome.hello') // bonjour !
translate('welcome.hello') // Bonjour !
```
</details>
<br/>
Expand All @@ -96,10 +96,6 @@ You may also have objects as parameters:
addTranslations('en' {
"hello": "hello, {{ user.name }}!"
});
```

```typescript
import { useI18n, useLocale } from 'solid-compose';

function Hello() {
const translate = useI18n();
Expand Down

0 comments on commit 51ac01c

Please sign in to comment.