mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-09-28 15:14:45 +02:00
Add how to get current locale
This commit is contained in:
parent
10b44382b8
commit
8a3b674ac0
@ -74,6 +74,10 @@ store.i18n.setLocale('en-US')
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Current locale
|
||||||
|
|
||||||
|
The current locale is available via `this.store.get().locale`.
|
||||||
|
|
||||||
#### Interpolation
|
#### Interpolation
|
||||||
|
|
||||||
```html
|
```html
|
||||||
@ -128,4 +132,4 @@ store.i18n.setLocale('en-US')
|
|||||||
{$_.title('greeting', { name: 'John' }))}
|
{$_.title('greeting', { name: 'John' }))}
|
||||||
<!-- Hello John, How Are You?-->
|
<!-- Hello John, How Are You?-->
|
||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user