diff --git a/docs/guide/i18n-options.md b/docs/guide/i18n-options.md index b9076d1..4d490e9 100644 --- a/docs/guide/i18n-options.md +++ b/docs/guide/i18n-options.md @@ -1,9 +1,8 @@ # i18nOptions - ## namespaces -The namespace will be loaded with (loadNamespaces)[http://i18next.com/docs/api/#load-namespaces],so one can lazy load namespaces for components. +The namepace will not be loaded automatically, see [loadComponentNamespace](/guide/started.html#init) ```javascript const locales = { @@ -51,7 +50,6 @@ const app = { } }; - i18next.init({ lng: "en", fallbackLng: "en", @@ -63,7 +61,7 @@ i18next.init({ const i18n = new VueI18next(i18next); Vue.component("app", { - i18nOptions: { namespaces: ["app","common"] }, + i18nOptions: { namespaces: ["app", "common"] }, template: `{{ $t("promise") }}` }); ``` @@ -97,6 +95,7 @@ Vue.component('app', { ``` ## messages + Translations can not only be defined in translation files but also in the `i18nOptions`. ```javascript @@ -142,4 +141,3 @@ Vue.component('app', { `, }); ``` - diff --git a/docs/guide/started.md b/docs/guide/started.md index 8dfd10e..f2560db 100644 --- a/docs/guide/started.md +++ b/docs/guide/started.md @@ -34,3 +34,11 @@ new Vue({ i18n: i18n, }); ``` + +## Init options + +| Name | Description | +| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **loadComponentNamespace** | When using the [namespace options](/guide/i18n-options.md#namespaces) the namespaces will be loaded with [loadNamespaces](https://www.i18next.com/overview/api#loadnamespaces),
so one can lazy load namespaces for components. | +| **bindI18n** | Listen for `i18next` events and refreshes the component.
Check the [i18next documentation for more infos](https://www.i18next.com/overview/api#events) | +| **bindStore** | Listen for `i18next` store events and refreshes the component.
Check the [i18next store documentation for more infos](https://www.i18next.com/overview/api#store-events) |