Skip to content

Commit

Permalink
Add capitalize default modifier in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreDavid authored Apr 9, 2020
1 parent e88c37a commit 7aa148c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/messages.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</code></pre></div><p>Template:</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>{{ $t('message.linked') }}<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>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>DIO: the 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><h3 id="formatting-linked-locale-messages"><a href="#formatting-linked-locale-messages" aria-hidden="true" class="header-anchor">#</a> Formatting linked locale messages</h3> <p>If the language distinguish cases of character, you may need control the case of the linked locale messages.
Linked messages can be formatted with modifier <code>@.modifier:key</code></p> <p>The below modifiers are available currently.</p> <ul><li><code>upper</code>: Uppercase all characters in the linked message.</li> <li><code>lower</code>: Lowercase all characters in the linked message.</li></ul> <p>Locale messages the below:</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">const</span> messages <span class="token operator">=</span> <span class="token punctuation">{</span>
Linked messages can be formatted with modifier <code>@.modifier:key</code></p> <p>The below modifiers are available currently.</p> <ul><li><code>upper</code>: Uppercase all characters in the linked message.</li> <li><code>lower</code>: Lowercase all characters in the linked message.</li> <li><code>capitalize</code>: Capitalize the first character in the linked message.</li></ul> <p>Locale messages the below:</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">const</span> messages <span class="token operator">=</span> <span class="token punctuation">{</span>
en<span class="token punctuation">:</span> <span class="token punctuation">{</span>
message<span class="token punctuation">:</span> <span class="token punctuation">{</span>
homeAddress<span class="token punctuation">:</span> <span class="token string">'Home address'</span><span class="token punctuation">,</span>
Expand Down

0 comments on commit 7aa148c

Please sign in to comment.