docs: ✏️ add mention to i18n-ally

This commit is contained in:
Christian Kaisermann 2020-11-07 10:58:17 -03:00
parent d85a58aea4
commit 6d768b9ae9
2 changed files with 8 additions and 2 deletions

View File

@ -47,3 +47,4 @@
- [Documentation](/docs/Getting%20Started.md)
- [Sapper Template](https://github.com/kaisermann/sapper-template-i18n)
- [i18n VSCode extension (3rd party)](https://github.com/antfu/i18n-ally)

View File

@ -5,12 +5,13 @@
<!-- code_chunk_output -->
- [1. Installing](#1-installing)
- [1.1 VSCode extension](#11-vscode-extension)
- [2. Locale dictionaries](#2-locale-dictionaries)
- [3. Adding locale dictionaries](#3-adding-locale-dictionaries)
- [3.1 Synchronous](#31-synchronous)
- [3.2 Asynchronous](#32-asynchronous)
- [4. Initializing](#4-initializing)
- [4. Localizing your app](#4-localizing-your-app)
- [5. Localizing your app](#5-localizing-your-app)
<!-- /code_chunk_output -->
@ -25,6 +26,10 @@ yarn add svelte-i18n
yarn add -D @rollup/plugin-json
```
##### 1.1 VSCode extension
If you're using `VSCode` and want to have your messages previewed alongside your components, checkout the [i18n-ally](https://github.com/antfu/i18n-ally) and their [FAQ](https://github.com/antfu/i18n-ally/wiki/FAQ) to see how to set it up.
#### 2. Locale dictionaries
A locale dictionary is a regular JSON object which contains message definitions for a certain language.
@ -125,7 +130,7 @@ In **Sapper**, you can use the `preload` static method together with `waitLocale
Please note that the `fallbackLocale` is always loaded, independent of the current locale, since only some messages can be missing.
#### 4. Localizing your app
#### 5. Localizing your app
After having the initial locale set, you're ready to start localizing your app. Import the [`$format`](/docs/Formatting.md) method, or any of its aliases, to any component that needs to be translated. Then, just call [`$format`](/docs/Formatting.md) passing the message `id` on your layout and voila! 🎉