Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/guide/essentials/fallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Will result in the following fallback chains:

## Fallback interpolation

Set `formatFallbackMessages: true` to do template interpolation on translation keys when your language lacks a translation for a key.
Set `fallbackFormat: true` to do template interpolation on translation keys when your language lacks a translation for a key.

Since the keys to the translations are strings, you can use a user-readable message (for a particular language) as a key.
E.g.
Expand All @@ -121,7 +121,7 @@ const messages = {

This is useful because you don’t have to specify a translation for the string "Hello, world!" into English.

In fact, you can even include template parameters in a key. Together with `formatFallbackMessages: true`, this lets you skip writing templates for your "base" language; the keys *are* your templates.
In fact, you can even include template parameters in a key. Together with `fallbackFormat: true`, this lets you skip writing templates for your "base" language; the keys *are* your templates.

```javascript
const messages = {
Expand All @@ -133,7 +133,7 @@ const messages = {
const i18n = createI18n({
locale: 'ru',
fallbackLocale: 'en',
formatFallbackMessages: true,
fallbackFormat: true,
messages
})
```
Expand Down