Skip to content

Commit

Permalink
Added missing quote (#925)
Browse files Browse the repository at this point in the history
* Added missing quote

* Added missing quote
  • Loading branch information
fschlag committed Jun 22, 2020
1 parent fe6787f commit 6304c34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/guide/fallback.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</code></pre></div><p>Output:</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>p</span><span class="token punctuation">&gt;</span></span>Hello, world!<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>p</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><p>By default, falling back to <code>fallbackLocale</code> generates two console warnings:</p> <div class="language-console extra-class"><pre class="language-text"><code>[vue-i18n] Value of key 'hello' is not a string!
[vue-i18n] Fall back to translate the keypath 'hello' with 'en' locale.
</code></pre></div><p>To suppress these warnings (while keeping those which warn of the total absence of translation for the given key) set <code>silentFallbackWarn: true</code> when initializing the <code>VueI18n</code> instance.</p> <h2 id="explicit-fallback-with-an-array-of-locales"><a href="#explicit-fallback-with-an-array-of-locales" class="header-anchor">#</a> Explicit fallback with an array of locales</h2> <p>It is possible to set more than one fallback locale by using an array of locales. For example</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code>fallbackLocale<span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">'fr'</span><span class="token punctuation">,</span> en' <span class="token punctuation">]</span><span class="token punctuation">,</span>
</code></pre></div><p>To suppress these warnings (while keeping those which warn of the total absence of translation for the given key) set <code>silentFallbackWarn: true</code> when initializing the <code>VueI18n</code> instance.</p> <h2 id="explicit-fallback-with-an-array-of-locales"><a href="#explicit-fallback-with-an-array-of-locales" class="header-anchor">#</a> Explicit fallback with an array of locales</h2> <p>It is possible to set more than one fallback locale by using an array of locales. For example</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code>fallbackLocale<span class="token operator">:</span> <span class="token punctuation">[</span> <span class="token string">'fr'</span><span class="token punctuation">,</span> 'en' <span class="token punctuation">]</span><span class="token punctuation">,</span>
</code></pre></div><h2 id="explicit-fallback-with-decision-maps"><a href="#explicit-fallback-with-decision-maps" class="header-anchor">#</a> Explicit fallback with decision maps</h2> <p>If more complex decision maps for fallback locales are required, it is possible to define decision maps with according fallback locales.
Using the following decision map</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code>fallbackLocale<span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token comment">/* 1 */</span> <span class="token string">'de-CH'</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">'fr'</span><span class="token punctuation">,</span> <span class="token string">'it'</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
Expand Down
2 changes: 1 addition & 1 deletion gitbook/en/fallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following will be the output:
It is possible to set more than one fallback locale by using an array of locales. For example

```javascript
fallbackLocale: [ 'fr', en' ],
fallbackLocale: [ 'fr', 'en' ],
```


Expand Down

0 comments on commit 6304c34

Please sign in to comment.