Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation improvemation #1104

Merged
merged 24 commits into from
Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9c6e444
initial translate at config page
lucasferreiralimax Jan 10, 2021
eda3bec
docs translate in Portuguese
lucasferreiralimax Jan 13, 2021
38ffb98
adjustment spacing and translate save
lucasferreiralimax Jan 13, 2021
6be3422
Merge remote-tracking branch 'vue-i18n/v8.x' into v8.x
lucasferreiralimax Jan 15, 2021
0875de7
reduce svg sendcloud and improvement viewBox
lucasferreiralimax Jan 15, 2021
bb79adf
improvement img alt, size and reflect information languages
lucasferreiralimax Jan 15, 2021
1d30341
docs: installation reflect information to languages
lucasferreiralimax Jan 15, 2021
f56507b
docs: legacy, api reflect information to languages
lucasferreiralimax Jan 15, 2021
4ff034b
Merge remote-tracking branch 'vue-i18n/v8.x' into v8.x
lucasferreiralimax Jan 17, 2021
d94b193
Adjustment clean of the patreon occurrences
lucasferreiralimax Jan 17, 2021
3c91f9f
docs: guide compoment page reflect information in languages
lucasferreiralimax Jan 17, 2021
f1a0aaf
docs: guide datetime page reflect information in languages
lucasferreiralimax Jan 17, 2021
4bc9654
docs: guide directive page reflect information in languages
lucasferreiralimax Jan 17, 2021
877a0ee
docs: guide fallback page reflect information in languages
lucasferreiralimax Jan 17, 2021
6d7f0e4
docs: guide hot-reload page reflect information in languages
lucasferreiralimax Jan 17, 2021
5719519
docs: guide interpolation page reflect information in languages
lucasferreiralimax Jan 17, 2021
40d6fee
docs: guide lazy-loading page reflect information in languages
lucasferreiralimax Jan 17, 2021
41dc62e
docs: guide locale page reflect information in languages
lucasferreiralimax Jan 17, 2021
ce3f091
docs: guide messages page reflect information in languages
lucasferreiralimax Jan 17, 2021
aee8893
docs: guide number page reflect information in languages
lucasferreiralimax Jan 17, 2021
fc000a6
docs: guide pluralization page reflect information in languages
lucasferreiralimax Jan 17, 2021
b20995b
adjustment link for default pluralization
lucasferreiralimax Jan 17, 2021
3a61903
docs: guide sfc adjustment example scoped style and reflect informati…
lucasferreiralimax Jan 17, 2021
a5a0bbd
docs: guide tooling page reflect information in languages
lucasferreiralimax Jan 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions vuepress/guide/locale.md
Expand Up @@ -25,11 +25,13 @@ Each component contains a `VueI18n` instance referenced as the `$i18n` property

Example:

```html
```vue
<template>
<div class="locale-changer">
<select v-model="$i18n.locale">
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">{{ lang }}</option>
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">
{{ lang }}
</option>
</select>
</div>
</template>
Expand Down
11 changes: 9 additions & 2 deletions vuepress/zh/guide/locale.md
Expand Up @@ -24,11 +24,13 @@ i18n.locale = 'en'

示例:

```html
```vue
<template>
<div class="locale-changer">
<select v-model="$i18n.locale">
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">{{ lang }}</option>
<option v-for="(lang, i) in langs" :key="`Lang${i}`" :value="lang">
{{ lang }}
</option>
</select>
</div>
</template>
Expand All @@ -46,3 +48,8 @@ export default {
:::warning 警告
:warning: 对于使用了 `sync: false` 的组件,语言环境的更改将被忽略。
:::

:::warning 组件与根范围
:warning: 在组件内更改 `$i18n.locale` 不会更新根语言环境。
如果您依靠根语言环境,例如在使用 [root fallbacks](./fallback.html) 时,请使用 `$root.$i18n.locale` 而不是$ `i18n.locale`。
lucasferreiralimax marked this conversation as resolved.
Show resolved Hide resolved
:::