diff --git a/docs/404.html b/docs/404.html index eb020a35b..9b23b3f98 100644 --- a/docs/404.html +++ b/docs/404.html @@ -7,11 +7,11 @@ - - + + -

404

Looks like we've got some broken links.
Take me home.
- +

404

There's nothing here.
Take me home.
+ diff --git a/docs/5.x/index.html b/docs/5.x/index.html index 149c19771..7dce094a0 100644 --- a/docs/5.x/index.html +++ b/docs/5.x/index.html @@ -7,8 +7,8 @@ - - + +
- + diff --git a/docs/api/index.html b/docs/api/index.html index 98afeb7a3..b1c9aa843 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -7,8 +7,8 @@ - - + +
- + diff --git a/docs/assets/css/styles.2d94bdde.css b/docs/assets/css/styles.b6e63c45.css similarity index 100% rename from docs/assets/css/styles.2d94bdde.css rename to docs/assets/css/styles.b6e63c45.css diff --git a/docs/assets/js/18.28aa9d63.js b/docs/assets/js/18.28aa9d63.js deleted file mode 100644 index 8a0ae5cc0..000000000 --- a/docs/assets/js/18.28aa9d63.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{196:function(t,a,s){"use strict";s.r(a);var n=s(0),p=Object(n.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"content"},[s("h1",{attrs:{id:"pluralization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#pluralization","aria-hidden":"true"}},[t._v("#")]),t._v(" Pluralization")]),t._v(" "),s("p",[t._v("You can translate with pluralization. You must define the locale that have a pipe "),s("code",[t._v("|")]),t._v(" separator, and define plurals in pipe separator.")]),t._v(" "),s("p",[t._v("Locale messages the below:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n car"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'car | cars'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n apple"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no apples | one apple | {count} apples'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Template the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 2) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n \n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 0) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10, { count: 10 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Output the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("car"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("cars"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n \n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("no apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("one apple"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h2",{attrs:{id:"accessing-the-number-via-the-pre-defined-argument"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#accessing-the-number-via-the-pre-defined-argument","aria-hidden":"true"}},[t._v("#")]),t._v(" Accessing the number via the pre-defined argument")]),t._v(" "),s("p",[t._v("You don't need to explicitly give the number for pluralization.\nThe number can be accessed within locale messages via pre-defined named arguments "),s("code",[t._v("{count}")]),t._v(" and/or "),s("code",[t._v("{n}")]),t._v(".\nYou can overwrite those pre-defined named arguments if necessary.")]),t._v(" "),s("p",[t._v("Locale messages the below:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n apple"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no apples | one apple | {count} apples'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n banana"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no bananas | {n} banana | {n} bananas'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Template the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10, { count: 10 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 1, { n: 1 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 100, { n: 'too much' }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Output the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("1 banana"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("1 banana"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("too much bananas"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])])}],!1,null,null,null);p.options.__file="pluralization.md";a.default=p.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/18.674a23bc.js b/docs/assets/js/18.674a23bc.js new file mode 100644 index 000000000..ac37a9dbb --- /dev/null +++ b/docs/assets/js/18.674a23bc.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{196:function(t,a,s){"use strict";s.r(a);var n=s(0),p=Object(n.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"content"},[s("h1",{attrs:{id:"pluralization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#pluralization","aria-hidden":"true"}},[t._v("#")]),t._v(" Pluralization")]),t._v(" "),s("p",[t._v("You can translate with pluralization. You must define the locale that have a pipe "),s("code",[t._v("|")]),t._v(" separator, and define plurals in pipe separator.")]),t._v(" "),s("p",[t._v("Locale messages the below:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n car"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'car | cars'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n apple"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no apples | one apple | {count} apples'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Template the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 2) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n \n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 0) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10, { count: 10 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Output the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("car"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("cars"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n \n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("no apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("one apple"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h2",{attrs:{id:"accessing-the-number-via-the-pre-defined-argument"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#accessing-the-number-via-the-pre-defined-argument","aria-hidden":"true"}},[t._v("#")]),t._v(" Accessing the number via the pre-defined argument")]),t._v(" "),s("p",[t._v("You don't need to explicitly give the number for pluralization.\nThe number can be accessed within locale messages via pre-defined named arguments "),s("code",[t._v("{count}")]),t._v(" and/or "),s("code",[t._v("{n}")]),t._v(".\nYou can overwrite those pre-defined named arguments if necessary.")]),t._v(" "),s("p",[t._v("Locale messages the below:")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n apple"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no apples | one apple | {count} apples'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n banana"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'no bananas | {n} banana | {n} bananas'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Template the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10, { count: 10 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('apple', 10) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 1, { n: 1 }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('banana', 100, { n: 'too much' }) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Output the below:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("10 apples"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("1 banana"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("1 banana"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("too much bananas"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("h2",{attrs:{id:"custom-pluralization"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#custom-pluralization","aria-hidden":"true"}},[t._v("#")]),t._v(" Custom pluralization")]),t._v(" "),s("p",[t._v("Such pluralization, however, does not apply to all languages (Slavic languages, for example, have different pluralization rules).")]),t._v(" "),s("p",[t._v("In order to implement these rules you can override the "),s("code",[t._v("VueI18n.prototype.getChoiceIndex")]),t._v(" function.")]),t._v(" "),s("p",[t._v("Very simplified example using rules for Slavic langauges (Russian, Ukrainian, etc.):")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token comment"}},[t._v("/**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choiceLength {number} an overall amount of available choices\n * @returns a final choice index to select plural word by\n**/")]),t._v("\nVueI18n"),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),t._v("prototype"),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{attrs:{class:"token function-variable function"}},[t._v("getChoiceIndex")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token keyword"}},[t._v("function")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),t._v("choice"),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" choicesLength"),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("// this === VueI18n instance, so the locale property also exists here")]),t._v("\n "),s("span",{attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token keyword"}},[t._v("this")]),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),t._v("locale "),s("span",{attrs:{class:"token operator"}},[t._v("!==")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'ru'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("// proceed to the default implementation")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),t._v("choice "),s("span",{attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("0")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("0")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" teen "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" choice "),s("span",{attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("10")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("&&")]),t._v(" choice "),s("span",{attrs:{class:"token operator"}},[t._v("<")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("20")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" endsWithOne "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" choice "),s("span",{attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("10")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("1")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token operator"}},[t._v("!")]),t._v("teen "),s("span",{attrs:{class:"token operator"}},[t._v("&&")]),t._v(" endsWithOne"),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("1")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token operator"}},[t._v("!")]),t._v("teen "),s("span",{attrs:{class:"token operator"}},[t._v("&&")]),t._v(" choice "),s("span",{attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("10")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v(">=")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("2")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("&&")]),t._v(" choice "),s("span",{attrs:{class:"token operator"}},[t._v("%")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("10")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("<=")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("4")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("2")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),t._v("choicesLength "),s("span",{attrs:{class:"token operator"}},[t._v("<")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("4")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{attrs:{class:"token operator"}},[t._v("?")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("2")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token number"}},[t._v("3")]),s("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("This would effectively give this:")]),t._v(" "),s("div",{staticClass:"language-javascript extra-class"},[s("pre",{pre:!0,attrs:{class:"language-javascript"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n ru"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n car"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'0 машин | 1 машина | {n} машины | {n} машин'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n banana"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'нет бананов | 1 банан | {n} банана | {n} бананов'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Where the format is "),s("code",[t._v("0 things | 1 thing | few things | multiple things")]),t._v(".")]),t._v(" "),s("p",[t._v("Your template still needs to use "),s("code",[t._v("$tc()")]),t._v(", not "),s("code",[t._v("$t()")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 1) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 2) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 4) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 12) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 21) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 0) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 4) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 11) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $tc('car', 31) }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),s("p",[t._v("Which results in:")]),t._v(" "),s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("1 машина"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("2 машины"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("4 машины"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("12 машин"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("21 машина"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("нет бананов"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("4 банана"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("11 бананов"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("31 банан"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])])}],!1,null,null,null);p.options.__file="pluralization.md";a.default=p.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/5.14da18f4.js b/docs/assets/js/5.14da18f4.js new file mode 100644 index 000000000..af8377b47 --- /dev/null +++ b/docs/assets/js/5.14da18f4.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{189:function(t,e,s){"use strict";s.r(e);var a=s(0),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),s("p",[t._v("Component based localization option.")]),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),s("p",[t._v("Localize the locale message of "),s("code",[t._v("key")]),t._v(". Localize in preferentially component locale messages than global locale messages. If not specified component locale messages, localize with global locale messages. If you specified "),s("code",[t._v("locale")]),t._v(", localize the locale messages of "),s("code",[t._v("locale")]),t._v(". If you specified "),s("code",[t._v("key")]),t._v(" of list / named formatting local messages, you must specify "),s("code",[t._v("values")]),t._v(" too. For "),s("code",[t._v("values")]),t._v(" more details see "),s("router-link",{attrs:{to:"./../guide/formatting.html"}},[t._v("Formatting")]),t._v(".")],1),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),t._m(14),t._v(" "),t._m(15),t._v(" "),t._m(16),t._v(" "),t._m(17),t._v(" "),t._m(18),t._v(" "),t._m(19),t._v(" "),t._m(20),t._v(" "),t._m(21),t._v(" "),t._m(22),t._v(" "),t._m(23),t._v(" "),t._m(24),t._v(" "),t._m(25),t._v(" "),t._m(26),t._v(" "),t._m(27),t._v(" "),t._m(28),t._v(" "),t._m(29),t._v(" "),t._m(30),t._v(" "),t._m(31),t._v(" "),t._m(32),t._v(" "),t._m(33),t._v(" "),t._m(34),t._v(" "),t._m(35),t._v(" "),t._m(36),t._v(" "),t._m(37),t._v(" "),t._m(38),t._v(" "),s("p",[s("code",[t._v("Vuei18n")]),t._v(" class implement "),s("code",[t._v("I18n")]),t._v(" interface of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)]),t._v(" "),t._m(39),t._v(" "),t._m(40),t._v(" "),t._m(41),t._v(" "),s("p",[t._v("vue-i18n version.")]),t._v(" "),t._m(42),t._v(" "),t._m(43),t._v(" "),t._m(44),t._v(" "),s("p",[t._v("Whether the following internationalization features are available:")]),t._v(" "),t._m(45),t._v(" "),s("p",[t._v("The above internationalization features are depends on "),s("a",{attrs:{href:"http://kangax.github.io/compat-table/esintl/",target:"_blank",rel:"noopener noreferrer"}},[t._v("the browser environmens"),s("OutboundLink")],1),t._v(", due to implement with ECMAScript Internationalization API (ECMA-402).")]),t._v(" "),t._m(46),t._v(" "),s("p",[t._v("You can specify the below some options of "),s("code",[t._v("I18nOptions")]),t._v(" constructor options of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)]),t._v(" "),t._m(47),t._v(" "),t._m(48),t._v(" "),s("p",[t._v("The locale of localization.")]),t._v(" "),t._m(49),t._v(" "),t._m(50),t._v(" "),s("p",[t._v("The locale of fallback localization.")]),t._v(" "),t._m(51),t._v(" "),t._m(52),t._v(" "),s("p",[t._v("The locale messages of localization.")]),t._v(" "),t._m(53),t._v(" "),t._m(54),t._v(" "),t._m(55),t._v(" "),s("p",[t._v("The datetime formats of localization.")]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("code",[t._v("DateTimeFormats")]),t._v(" type of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)])]),t._v(" "),t._m(56),t._v(" "),t._m(57),t._v(" "),t._m(58),t._v(" "),s("p",[t._v("The number formats of localization.")]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("code",[t._v("NumberFormats")]),t._v(" type of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)])]),t._v(" "),t._m(59),t._v(" "),t._m(60),t._v(" "),t._m(61),t._v(" "),t._m(62),t._v(" "),t._m(63),t._v(" "),s("p",[t._v("A hander for localization missing. The handler gets called with the localization target locale, localization path key and the Vue instance.")]),t._v(" "),s("p",[t._v("If missing hander is assigned, and occured localization missing, it's not warned.")]),t._v(" "),t._m(64),t._v(" "),t._m(65),t._v(" "),s("p",[t._v("In the component localization, whether to fall back to root level (global) localization when localization fails.")]),t._v(" "),t._m(66),t._v(" "),t._m(67),t._v(" "),t._m(68),t._v(" "),s("p",[t._v("Whether synchronize the root level locale to the component localization locale.")]),t._v(" "),t._m(69),t._v(" "),t._m(70),t._v(" "),t._m(71),t._v(" "),t._m(72),t._v(" "),s("p",[t._v("Whether suppress warnings outputted when localization fails.")]),t._v(" "),t._m(73),t._v(" "),t._m(74),t._v(" "),t._m(75),t._v(" "),t._m(76),t._v(" "),s("p",[t._v("The locale of localization.")]),t._v(" "),t._m(77),t._v(" "),t._m(78),t._v(" "),s("p",[t._v("The locale of fallback localization.")]),t._v(" "),t._m(79),t._v(" "),t._m(80),t._v(" "),s("p",[t._v("The locale messages of localization.")]),t._v(" "),t._m(81),t._v(" "),t._m(82),t._v(" "),t._m(83),t._v(" "),s("p",[t._v("The datetime formats of localization.")]),t._v(" "),t._m(84),t._v(" "),t._m(85),t._v(" "),t._m(86),t._v(" "),s("p",[t._v("The number formats of localization.")]),t._v(" "),t._m(87),t._v(" "),t._m(88),t._v(" "),s("p",[t._v("A hander for localization missing.")]),t._v(" "),t._m(89),t._v(" "),t._m(90),t._v(" "),t._m(91),t._v(" "),t._m(92),t._v(" "),t._m(93),t._v(" "),t._m(94),t._v(" "),s("p",[t._v("Whether suppress warnings outputted when localization fails.")]),t._v(" "),t._m(95),t._v(" "),t._m(96),t._v(" "),t._m(97),t._v(" "),s("p",[t._v("Get pluralization index for current pluralizing number and a given amount of choices. Can be overriden through prototype mutation:")]),t._v(" "),t._m(98),t._m(99),t._v(" "),t._m(100),t._v(" "),s("p",[t._v("Get the locale message of locale.")]),t._v(" "),t._m(101),t._v(" "),t._m(102),t._v(" "),s("p",[t._v("Set the locale message of locale.")]),t._v(" "),t._m(103),t._v(" "),t._m(104),t._v(" "),t._m(105),t._v(" "),s("p",[t._v("Merge the registered locale messages with the locale message of locale.")]),t._v(" "),t._m(106),t._v(" "),t._m(107),t._v(" "),t._m(108),t._v(" "),t._m(109),t._v(" "),t._m(110),t._v(" "),t._m(111),t._v(" "),t._m(112),t._v(" "),t._m(113),t._v(" "),t._m(114),t._v(" "),t._m(115),t._v(" "),t._m(116),t._v(" "),t._m(117),t._v(" "),t._m(118),t._v(" "),t._m(119),t._v(" "),t._m(120),t._v(" "),s("p",[t._v("Get the datetime format of locale.")]),t._v(" "),t._m(121),t._v(" "),t._m(122),t._v(" "),t._m(123),t._v(" "),s("p",[t._v("Set the datetime format of locale.")]),t._v(" "),t._m(124),t._v(" "),t._m(125),t._v(" "),t._m(126),t._v(" "),s("p",[t._v("Merge the registered datetime formats with the datetime format of locale.")]),t._v(" "),t._m(127),t._v(" "),t._m(128),t._v(" "),t._m(129),t._v(" "),t._m(130),t._v(" "),t._m(131),t._v(" "),t._m(132),t._v(" "),t._m(133),t._v(" "),s("p",[t._v("Get the number format of locale.")]),t._v(" "),t._m(134),t._v(" "),t._m(135),t._v(" "),t._m(136),t._v(" "),s("p",[t._v("Set the number format of locale.")]),t._v(" "),t._m(137),t._v(" "),t._m(138),t._v(" "),t._m(139),t._v(" "),s("p",[t._v("Merge the registered number formats with the number format of locale.")]),t._v(" "),t._m(140),t._v(" "),t._m(141),t._v(" "),t._m(142),t._v(" "),t._m(143),t._v(" "),t._m(144),t._v(" "),t._m(145),t._v(" "),t._m(146),t._v(" "),t._m(147),t._v(" "),t._m(148),t._v(" "),t._m(149),t._v(" "),t._m(150),t._v(" "),t._m(151),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("router-link",{attrs:{to:"./../guide/directive.html"}},[t._v("Custom directive localization")])],1)]),t._v(" "),t._m(152),t._v(" "),t._m(153),t._v(" "),t._m(154),t._v(" "),t._m(155),t._v(" "),t._m(156),t._v(" "),t._m(157),t._v(" "),t._m(158),t._m(159),t._m(160),t._v(" "),s("p",[s("router-link",{attrs:{to:"./../guide/interpolation.html"}},[t._v("Component interpolation")])],1),t._v(" "),t._m(161),t._v(" "),t._m(162),t._v(" "),t._m(163),t._v(" "),t._m(164),t._v(" "),s("p",[t._v("Used on component interpolation to indicate which index of list formatting or key of named formatting.")]),t._v(" "),s("p",[t._v("For detailed usage, see the guide section linked below.")]),t._v(" "),t._m(165),t._v(" "),s("p",[s("router-link",{attrs:{to:"./../guide/interpolation.html"}},[t._v("Component interpolation")])],1)])},[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"api-references"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#api-references","aria-hidden":"true"}},[this._v("#")]),this._v(" API references")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"extension-of-vue"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#extension-of-vue","aria-hidden":"true"}},[this._v("#")]),this._v(" Extension of Vue")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"vue-constructor-options"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vue-constructor-options","aria-hidden":"true"}},[this._v("#")]),this._v(" Vue constructor options")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i18n"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n","aria-hidden":"true"}},[this._v("#")]),this._v(" i18n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("I18nOptions")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("See also:")]),this._v(" "),e("code",[this._v("VueI18n")]),this._v(" class constructor options")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"vue-injected-methods"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vue-injected-methods","aria-hidden":"true"}},[this._v("#")]),this._v(" Vue injected methods")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"t"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#t","aria-hidden":"true"}},[this._v("#")]),this._v(" $t")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $t = this.$t.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"tc"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tc","aria-hidden":"true"}},[this._v("#")]),this._v(" $tc")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{number} choice")]),t._v(": optional, default 1")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{string | Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the locale message of "),s("code",[t._v("key")]),t._v(" with pluralization. Localize in preferentially component locale messages than global locale messages. If not specified component locale messages, localize with global locale messages. If you specified "),s("code",[t._v("locale")]),t._v(", localize the locale messages of "),s("code",[t._v("locale")]),t._v(". If you will specify string value to "),s("code",[t._v("values")]),t._v(", localize the locale messages of value. If you will specify Array or Object value to "),s("code",[t._v("values")]),t._v(", you must specify with "),s("code",[t._v("values")]),t._v(" of $t.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $tc = this.$tc.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"te"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#te","aria-hidden":"true"}},[this._v("#")]),this._v(" $te")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("boolean")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Check whether key exists. In Vue instance, If not specified component locale messages, check with global locale messages. If you specified "),e("code",[this._v("locale")]),this._v(", check the locale messages of "),e("code",[this._v("locale")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $te = this.$te.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"d"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#d","aria-hidden":"true"}},[this._v("#")]),this._v(" $d")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number | Date} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale | Object} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("DateTimeFormatResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the datetime of "),s("code",[t._v("value")]),t._v(" with datetime format of "),s("code",[t._v("key")]),t._v(". The datetime format of "),s("code",[t._v("key")]),t._v(" need to register to "),s("code",[t._v("dateTimeFormats")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" class, and depend on "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor. If you will specify "),s("code",[t._v("locale")]),t._v(" argument, it will have priority over "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("If the datetime format of "),s("code",[t._v("key")]),t._v(" not exist in "),s("code",[t._v("dateTimeFormats")]),t._v(" option, fallback to depened on "),s("code",[t._v("fallbackLocale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $n = this.$n.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"n"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#n","aria-hidden":"true"}},[this._v("#")]),this._v(" $n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("NumberFormatResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the number of "),s("code",[t._v("value")]),t._v(" with number format of "),s("code",[t._v("key")]),t._v(". The number format of "),s("code",[t._v("key")]),t._v(" need to register to "),s("code",[t._v("numberFormats")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" class, and depend on "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor. If you will specify "),s("code",[t._v("locale")]),t._v(" argument, it will have priority over "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("If the number format of "),s("code",[t._v("key")]),t._v(" not exist in "),s("code",[t._v("numberFormats")]),t._v(" option, fallback to depened on "),s("code",[t._v("fallbackLocale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If the second "),e("code",[this._v("key")]),this._v(" argument specified as an object, it should have the following properties:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("code",[t._v("key {Path}")]),t._v(": optional, number format")]),t._v(" "),s("li",[s("code",[t._v("locale {Locale}")]),t._v(": optional, locale")]),t._v(" "),s("li",[s("code",[t._v("style {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("currency {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("currencyDisplay {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("useGrouping {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumIntegerDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumFractionDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("maximumFractionDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumSignificantDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("maximumSignificantDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("localeMatcher {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("formatMatcher {string}")]),t._v(": optional, number format option")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Any specified number format options will have priority over "),e("code",[this._v("numberFormats")]),this._v(" of "),e("code",[this._v("VueI18n")]),this._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $d = this.$d.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"injected-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#injected-properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Injected properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i18n-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n-2","aria-hidden":"true"}},[this._v("#")]),this._v(" $i18n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("I18n")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Get a "),e("code",[this._v("VueI18n")]),this._v(" instance. If you are specify.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If you have specified an "),e("code",[this._v("i18n")]),this._v(" option at component options, you will be able to get a "),e("code",[this._v("VueI18n")]),this._v(" instance at the component, Otherwise, you will be able get root "),e("code",[this._v("VueI18n")]),this._v(" instance.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"vuei18n-class"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vuei18n-class","aria-hidden":"true"}},[this._v("#")]),this._v(" "),e("code",[this._v("VueI18n")]),this._v(" class")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"static-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#static-properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Static properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"version"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version","aria-hidden":"true"}},[this._v("#")]),this._v(" version")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("string")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"availabilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#availabilities","aria-hidden":"true"}},[this._v("#")]),this._v(" availabilities")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("IntlAvailability")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("code",[this._v("{boolean} dateTimeFormat")]),this._v(": locale sensitive datetime formatting")])]),this._v(" "),e("li",[e("p",[e("code",[this._v("{boolean} numberFormat")]),this._v(": locale sensitive number formatting")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"constructor-options"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#constructor-options","aria-hidden":"true"}},[this._v("#")]),this._v(" Constructor options")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#locale","aria-hidden":"true"}},[this._v("#")]),this._v(" locale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("'en-US'")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbacklocale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbacklocale","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackLocale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("'en-US'")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"messages"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#messages","aria-hidden":"true"}},[this._v("#")]),this._v(" messages")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("LocaleMessages")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"datetimeformats"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#datetimeformats","aria-hidden":"true"}},[this._v("#")]),this._v(" dateTimeFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("DateTimeFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"numberformats"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#numberformats","aria-hidden":"true"}},[this._v("#")]),this._v(" numberFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("NumberFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"formatter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatter","aria-hidden":"true"}},[this._v("#")]),this._v(" formatter")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Formatter")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" Built in formatter")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("The formatter that implemented with "),e("code",[this._v("Formatter")]),this._v(" interface.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"missing"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#missing","aria-hidden":"true"}},[this._v("#")]),this._v(" missing")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("MissingHandler")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("null")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbackroot"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbackroot","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackRoot")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("true")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("false")]),this._v(", it's warned, and is returned the key.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"sync"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sync","aria-hidden":"true"}},[this._v("#")]),this._v(" sync")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("true")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("false")]),this._v(", regardless of the root level locale, localize for each component locale.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"silenttranslationwarn"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#silenttranslationwarn","aria-hidden":"true"}},[this._v("#")]),this._v(" silentTranslationWarn")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("false")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("true")]),this._v(", supress localization fail warnings.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"locale-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#locale-2","aria-hidden":"true"}},[this._v("#")]),this._v(" locale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbacklocale-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbacklocale-2","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackLocale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"messages-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#messages-2","aria-hidden":"true"}},[this._v("#")]),this._v(" messages")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("LocaleMessages")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"datetimeformats-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#datetimeformats-2","aria-hidden":"true"}},[this._v("#")]),this._v(" dateTimeFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("DateTimeFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"numberformats-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#numberformats-2","aria-hidden":"true"}},[this._v("#")]),this._v(" numberFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("NumberFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"missing-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#missing-2","aria-hidden":"true"}},[this._v("#")]),this._v(" missing")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("MissingHandler")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"formatter-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatter-2","aria-hidden":"true"}},[this._v("#")]),this._v(" formatter")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Formatter")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("The formatter that implemented with "),e("code",[this._v("Formatter")]),this._v(" interface.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"silenttranslationwarn-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#silenttranslationwarn-2","aria-hidden":"true"}},[this._v("#")]),this._v(" silentTranslationWarn")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"methods"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#methods","aria-hidden":"true"}},[this._v("#")]),this._v(" Methods")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getchoiceindex"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getchoiceindex","aria-hidden":"true"}},[this._v("#")]),this._v(" getChoiceIndex")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number} choice")])]),t._v(" "),s("li",[s("code",[t._v("{number} choicesLength")])])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("finalChoice {number}")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("VueI18n"),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),t._v("prototype"),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),t._v("getChoiceIndex "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token comment"}},[t._v("/* custom implementation */")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getlocalemessage-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getlocalemessage-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getLocaleMessage( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("LocaleMessageObject")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setlocalemessage-locale-message"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setlocalemessage-locale-message","aria-hidden":"true"}},[this._v("#")]),this._v(" setLocaleMessage( locale, message )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{LocaleMessageObject} message")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergelocalemessage-locale-message"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergelocalemessage-locale-message","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeLocaleMessage( locale, message )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{LocaleMessageObject} message")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"t-key-locale-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#t-key-locale-values","aria-hidden":"true"}},[this._v("#")]),this._v(" t( key, [locale], [values] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" : "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as the "),e("code",[this._v("Function")]),this._v(" returned with "),e("code",[this._v("$t")]),this._v(" method. More detail see "),e("a",{attrs:{href:"#t"}},[this._v("$t")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i-key-locale-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-key-locale-values","aria-hidden":"true"}},[this._v("#")]),this._v(" i( key, [locale], [values] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" : "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"tc-key-choice-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tc-key-choice-values","aria-hidden":"true"}},[this._v("#")]),this._v(" tc( key, [choice], [values] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{number} choice")]),t._v(": optional, default "),s("code",[t._v("1")])]),t._v(" "),s("li",[s("code",[t._v("{string | Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as the "),e("code",[this._v("Function")]),this._v(" returned "),e("code",[this._v("$tc")]),this._v(" method. More detail see "),e("a",{attrs:{href:"#tc"}},[this._v("$tc")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"te-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#te-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" te( key, [locale] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{string} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("boolean")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Check whether key path exists in global locale message. If you specified "),e("code",[this._v("locale")]),this._v(", check the locale message of "),e("code",[this._v("locale")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getdatetimeformat-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getdatetimeformat-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getDateTimeFormat ( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("DateTimeFormat")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setdatetimeformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setdatetimeformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" setDateTimeFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{DateTimeFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergedatetimeformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergedatetimeformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeDateTimeFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{DateTimeFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"d-value-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#d-value-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" d( value, [key], [locale] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number | Date} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale | Object} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("DateTimeFormatResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as "),e("code",[this._v("$d")]),this._v(" method of Vue instance method. More detail see "),e("a",{attrs:{href:"#d"}},[this._v("$d")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getnumberformat-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getnumberformat-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getNumberFormat ( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("NumberFormat")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setnumberformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setnumberformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" setNumberFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{NumberFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergenumberformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergenumberformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeNumberFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{NumberFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"n-value-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#n-value-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" n( value, [key], [locale] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("NumberFormatResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as "),e("code",[this._v("$n")]),this._v(" method of Vue instance method. More detail see "),e("a",{attrs:{href:"#n"}},[this._v("$n")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"directives"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#directives","aria-hidden":"true"}},[this._v("#")]),this._v(" Directives")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.3+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"v-t"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#v-t","aria-hidden":"true"}},[this._v("#")]),this._v(" v-t")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Expects:")]),this._v(" "),e("code",[this._v("string | Object")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Details:")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Update the element "),e("code",[this._v("textContent")]),this._v(" that localized with locale messages. You can use string syntax or object syntax. string syntax can be specified as a keypath of locale messages. If you can be used object syntax, you need to specify as the object key the following params:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("pre",[e("code",[this._v("* path: required, key of locale messages\n* locale: optional, locale\n* args: optional, for list or named formatting\n")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Examples:")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- string syntax: literal --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("foo.bar"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- string syntax: binding via data or computed props --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("msg"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- object syntax: literal --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ path: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("hi"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(", locale: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("ja"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(", args: { name: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("kazupon"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(" } }"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- object syntax: binding via data or computed props --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ path: greeting, args: { name: fullName } }"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"components"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#components","aria-hidden":"true"}},[this._v("#")]),this._v(" Components")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"i18n-functional-component"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n-functional-component","aria-hidden":"true"}},[this._v("#")]),this._v(" i18n functional component")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"props"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#props","aria-hidden":"true"}},[this._v("#")]),this._v(" Props:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("code",[t._v("path {Path}")]),t._v(": required, keypath of locale messages")]),t._v(" "),s("li",[s("code",[t._v("locale {Locale}")]),t._v(": optional, locale")]),t._v(" "),s("li",[s("code",[t._v("tag {string}")]),t._v(": optional, default "),s("code",[t._v("span")])]),t._v(" "),s("li",[s("code",[t._v("places {Array | Object}")]),t._v(": optional (7.2+)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage","aria-hidden":"true"}},[this._v("#")]),this._v(" Usage:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("app"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("i18n")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("path")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("term"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("tag")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("label"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("for")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("tos"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("a")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v(":href")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("url"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("target")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("_blank"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $t('tos') }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n tos"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'Term of Service'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n term"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'I accept xxx {0}.'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ja"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n tos"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'利用規約'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n term"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'私は xxx の{0}に同意します。'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" i18n "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{attrs:{class:"token class-name"}},[t._v("VueI18n")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n locale"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'en'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n messages\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{attrs:{class:"token class-name"}},[t._v("Vue")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n i18n"),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n data"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'/term'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{attrs:{class:"token function"}},[t._v("$mount")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token string"}},[t._v("'#app'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"see-also"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#see-also","aria-hidden":"true"}},[this._v("#")]),this._v(" See also:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"special-attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#special-attributes","aria-hidden":"true"}},[this._v("#")]),this._v(" Special Attributes")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"place"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#place","aria-hidden":"true"}},[this._v("#")]),this._v(" place")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.2+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"expects-number-string"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#expects-number-string","aria-hidden":"true"}},[this._v("#")]),this._v(" Expects: "),e("code",[this._v("{number | string}")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"see-also-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#see-also-2","aria-hidden":"true"}},[this._v("#")]),this._v(" See also:")])}],!1,null,null,null);n.options.__file="README.md";e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/5.4f842b0f.js b/docs/assets/js/5.4f842b0f.js deleted file mode 100644 index d24c7c8c6..000000000 --- a/docs/assets/js/5.4f842b0f.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{189:function(t,e,s){"use strict";s.r(e);var a=s(0),n=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),s("p",[t._v("Component based localization option.")]),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),s("p",[t._v("Localize the locale message of "),s("code",[t._v("key")]),t._v(". Localize in preferentially component locale messages than global locale messages. If not specified component locale messages, localize with global locale messages. If you specified "),s("code",[t._v("locale")]),t._v(", localize the locale messages of "),s("code",[t._v("locale")]),t._v(". If you specified "),s("code",[t._v("key")]),t._v(" of list / named formatting local messages, you must specify "),s("code",[t._v("values")]),t._v(" too. For "),s("code",[t._v("values")]),t._v(" more details see "),s("router-link",{attrs:{to:"./../guide/formatting.html"}},[t._v("Formatting")]),t._v(".")],1),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),t._m(14),t._v(" "),t._m(15),t._v(" "),t._m(16),t._v(" "),t._m(17),t._v(" "),t._m(18),t._v(" "),t._m(19),t._v(" "),t._m(20),t._v(" "),t._m(21),t._v(" "),t._m(22),t._v(" "),t._m(23),t._v(" "),t._m(24),t._v(" "),t._m(25),t._v(" "),t._m(26),t._v(" "),t._m(27),t._v(" "),t._m(28),t._v(" "),t._m(29),t._v(" "),t._m(30),t._v(" "),t._m(31),t._v(" "),t._m(32),t._v(" "),t._m(33),t._v(" "),t._m(34),t._v(" "),t._m(35),t._v(" "),t._m(36),t._v(" "),t._m(37),t._v(" "),t._m(38),t._v(" "),s("p",[s("code",[t._v("Vuei18n")]),t._v(" class implement "),s("code",[t._v("I18n")]),t._v(" interface of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)]),t._v(" "),t._m(39),t._v(" "),t._m(40),t._v(" "),t._m(41),t._v(" "),s("p",[t._v("vue-i18n version.")]),t._v(" "),t._m(42),t._v(" "),t._m(43),t._v(" "),t._m(44),t._v(" "),s("p",[t._v("Whether the following internationalization features are available:")]),t._v(" "),t._m(45),t._v(" "),s("p",[t._v("The above internationalization features are depends on "),s("a",{attrs:{href:"http://kangax.github.io/compat-table/esintl/",target:"_blank",rel:"noopener noreferrer"}},[t._v("the browser environmens"),s("OutboundLink")],1),t._v(", due to implement with ECMAScript Internationalization API (ECMA-402).")]),t._v(" "),t._m(46),t._v(" "),s("p",[t._v("You can specify the below some options of "),s("code",[t._v("I18nOptions")]),t._v(" constructor options of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)]),t._v(" "),t._m(47),t._v(" "),t._m(48),t._v(" "),s("p",[t._v("The locale of localization.")]),t._v(" "),t._m(49),t._v(" "),t._m(50),t._v(" "),s("p",[t._v("The locale of fallback localization.")]),t._v(" "),t._m(51),t._v(" "),t._m(52),t._v(" "),s("p",[t._v("The locale messages of localization.")]),t._v(" "),t._m(53),t._v(" "),t._m(54),t._v(" "),t._m(55),t._v(" "),s("p",[t._v("The datetime formats of localization.")]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("code",[t._v("DateTimeFormats")]),t._v(" type of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)])]),t._v(" "),t._m(56),t._v(" "),t._m(57),t._v(" "),t._m(58),t._v(" "),s("p",[t._v("The number formats of localization.")]),t._v(" "),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("code",[t._v("NumberFormats")]),t._v(" type of "),s("a",{attrs:{href:"https://github.com/kazupon/vue-i18n/blob/dev/decls/i18n.js",target:"_blank",rel:"noopener noreferrer"}},[t._v("flowtype definitions"),s("OutboundLink")],1)])]),t._v(" "),t._m(59),t._v(" "),t._m(60),t._v(" "),t._m(61),t._v(" "),t._m(62),t._v(" "),t._m(63),t._v(" "),s("p",[t._v("A hander for localization missing. The handler gets called with the localization target locale, localization path key and the Vue instance.")]),t._v(" "),s("p",[t._v("If missing hander is assigned, and occured localization missing, it's not warned.")]),t._v(" "),t._m(64),t._v(" "),t._m(65),t._v(" "),s("p",[t._v("In the component localization, whether to fall back to root level (global) localization when localization fails.")]),t._v(" "),t._m(66),t._v(" "),t._m(67),t._v(" "),t._m(68),t._v(" "),s("p",[t._v("Whether synchronize the root level locale to the component localization locale.")]),t._v(" "),t._m(69),t._v(" "),t._m(70),t._v(" "),t._m(71),t._v(" "),t._m(72),t._v(" "),s("p",[t._v("Whether suppress warnings outputted when localization fails.")]),t._v(" "),t._m(73),t._v(" "),t._m(74),t._v(" "),t._m(75),t._v(" "),t._m(76),t._v(" "),s("p",[t._v("The locale of localization.")]),t._v(" "),t._m(77),t._v(" "),t._m(78),t._v(" "),s("p",[t._v("The locale of fallback localization.")]),t._v(" "),t._m(79),t._v(" "),t._m(80),t._v(" "),s("p",[t._v("The locale messages of localization.")]),t._v(" "),t._m(81),t._v(" "),t._m(82),t._v(" "),t._m(83),t._v(" "),s("p",[t._v("The datetime formats of localization.")]),t._v(" "),t._m(84),t._v(" "),t._m(85),t._v(" "),t._m(86),t._v(" "),s("p",[t._v("The number formats of localization.")]),t._v(" "),t._m(87),t._v(" "),t._m(88),t._v(" "),s("p",[t._v("A hander for localization missing.")]),t._v(" "),t._m(89),t._v(" "),t._m(90),t._v(" "),t._m(91),t._v(" "),t._m(92),t._v(" "),t._m(93),t._v(" "),t._m(94),t._v(" "),s("p",[t._v("Whether suppress warnings outputted when localization fails.")]),t._v(" "),t._m(95),t._v(" "),t._m(96),t._v(" "),t._m(97),t._v(" "),s("p",[t._v("Get the locale message of locale.")]),t._v(" "),t._m(98),t._v(" "),t._m(99),t._v(" "),s("p",[t._v("Set the locale message of locale.")]),t._v(" "),t._m(100),t._v(" "),t._m(101),t._v(" "),t._m(102),t._v(" "),s("p",[t._v("Merge the registered locale messages with the locale message of locale.")]),t._v(" "),t._m(103),t._v(" "),t._m(104),t._v(" "),t._m(105),t._v(" "),t._m(106),t._v(" "),t._m(107),t._v(" "),t._m(108),t._v(" "),t._m(109),t._v(" "),t._m(110),t._v(" "),t._m(111),t._v(" "),t._m(112),t._v(" "),t._m(113),t._v(" "),t._m(114),t._v(" "),t._m(115),t._v(" "),t._m(116),t._v(" "),t._m(117),t._v(" "),s("p",[t._v("Get the datetime format of locale.")]),t._v(" "),t._m(118),t._v(" "),t._m(119),t._v(" "),t._m(120),t._v(" "),s("p",[t._v("Set the datetime format of locale.")]),t._v(" "),t._m(121),t._v(" "),t._m(122),t._v(" "),t._m(123),t._v(" "),s("p",[t._v("Merge the registered datetime formats with the datetime format of locale.")]),t._v(" "),t._m(124),t._v(" "),t._m(125),t._v(" "),t._m(126),t._v(" "),t._m(127),t._v(" "),t._m(128),t._v(" "),t._m(129),t._v(" "),t._m(130),t._v(" "),s("p",[t._v("Get the number format of locale.")]),t._v(" "),t._m(131),t._v(" "),t._m(132),t._v(" "),t._m(133),t._v(" "),s("p",[t._v("Set the number format of locale.")]),t._v(" "),t._m(134),t._v(" "),t._m(135),t._v(" "),t._m(136),t._v(" "),s("p",[t._v("Merge the registered number formats with the number format of locale.")]),t._v(" "),t._m(137),t._v(" "),t._m(138),t._v(" "),t._m(139),t._v(" "),t._m(140),t._v(" "),t._m(141),t._v(" "),t._m(142),t._v(" "),t._m(143),t._v(" "),t._m(144),t._v(" "),t._m(145),t._v(" "),t._m(146),t._v(" "),t._m(147),t._v(" "),t._m(148),s("ul",[s("li",[s("strong",[t._v("See also:")]),t._v(" "),s("router-link",{attrs:{to:"./../guide/directive.html"}},[t._v("Custom directive localization")])],1)]),t._v(" "),t._m(149),t._v(" "),t._m(150),t._v(" "),t._m(151),t._v(" "),t._m(152),t._v(" "),t._m(153),t._v(" "),t._m(154),t._v(" "),t._m(155),t._m(156),t._m(157),t._v(" "),s("p",[s("router-link",{attrs:{to:"./../guide/interpolation.html"}},[t._v("Component interpolation")])],1),t._v(" "),t._m(158),t._v(" "),t._m(159),t._v(" "),t._m(160),t._v(" "),t._m(161),t._v(" "),s("p",[t._v("Used on component interpolation to indicate which index of list formatting or key of named formatting.")]),t._v(" "),s("p",[t._v("For detailed usage, see the guide section linked below.")]),t._v(" "),t._m(162),t._v(" "),s("p",[s("router-link",{attrs:{to:"./../guide/interpolation.html"}},[t._v("Component interpolation")])],1)])},[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"api-references"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#api-references","aria-hidden":"true"}},[this._v("#")]),this._v(" API references")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"extension-of-vue"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#extension-of-vue","aria-hidden":"true"}},[this._v("#")]),this._v(" Extension of Vue")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"vue-constructor-options"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vue-constructor-options","aria-hidden":"true"}},[this._v("#")]),this._v(" Vue constructor options")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i18n"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n","aria-hidden":"true"}},[this._v("#")]),this._v(" i18n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("I18nOptions")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("See also:")]),this._v(" "),e("code",[this._v("VueI18n")]),this._v(" class constructor options")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"vue-injected-methods"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vue-injected-methods","aria-hidden":"true"}},[this._v("#")]),this._v(" Vue injected methods")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"t"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#t","aria-hidden":"true"}},[this._v("#")]),this._v(" $t")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $t = this.$t.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"tc"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tc","aria-hidden":"true"}},[this._v("#")]),this._v(" $tc")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{number} choice")]),t._v(": optional, default 1")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{string | Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the locale message of "),s("code",[t._v("key")]),t._v(" with pluralization. Localize in preferentially component locale messages than global locale messages. If not specified component locale messages, localize with global locale messages. If you specified "),s("code",[t._v("locale")]),t._v(", localize the locale messages of "),s("code",[t._v("locale")]),t._v(". If you will specify string value to "),s("code",[t._v("values")]),t._v(", localize the locale messages of value. If you will specify Array or Object value to "),s("code",[t._v("values")]),t._v(", you must specify with "),s("code",[t._v("values")]),t._v(" of $t.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $tc = this.$tc.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"te"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#te","aria-hidden":"true"}},[this._v("#")]),this._v(" $te")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("boolean")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Check whether key exists. In Vue instance, If not specified component locale messages, check with global locale messages. If you specified "),e("code",[this._v("locale")]),this._v(", check the locale messages of "),e("code",[this._v("locale")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $te = this.$te.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"d"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#d","aria-hidden":"true"}},[this._v("#")]),this._v(" $d")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number | Date} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale | Object} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("DateTimeFormatResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the datetime of "),s("code",[t._v("value")]),t._v(" with datetime format of "),s("code",[t._v("key")]),t._v(". The datetime format of "),s("code",[t._v("key")]),t._v(" need to register to "),s("code",[t._v("dateTimeFormats")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" class, and depend on "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor. If you will specify "),s("code",[t._v("locale")]),t._v(" argument, it will have priority over "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("If the datetime format of "),s("code",[t._v("key")]),t._v(" not exist in "),s("code",[t._v("dateTimeFormats")]),t._v(" option, fallback to depened on "),s("code",[t._v("fallbackLocale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $n = this.$n.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"n"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#n","aria-hidden":"true"}},[this._v("#")]),this._v(" $n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("NumberFormatResult")])])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("Localize the number of "),s("code",[t._v("value")]),t._v(" with number format of "),s("code",[t._v("key")]),t._v(". The number format of "),s("code",[t._v("key")]),t._v(" need to register to "),s("code",[t._v("numberFormats")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" class, and depend on "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor. If you will specify "),s("code",[t._v("locale")]),t._v(" argument, it will have priority over "),s("code",[t._v("locale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("p",[t._v("If the number format of "),s("code",[t._v("key")]),t._v(" not exist in "),s("code",[t._v("numberFormats")]),t._v(" option, fallback to depened on "),s("code",[t._v("fallbackLocale")]),t._v(" option of "),s("code",[t._v("VueI18n")]),t._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If the second "),e("code",[this._v("key")]),this._v(" argument specified as an object, it should have the following properties:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("code",[t._v("key {Path}")]),t._v(": optional, number format")]),t._v(" "),s("li",[s("code",[t._v("locale {Locale}")]),t._v(": optional, locale")]),t._v(" "),s("li",[s("code",[t._v("style {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("currency {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("currencyDisplay {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("useGrouping {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumIntegerDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumFractionDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("maximumFractionDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("minimumSignificantDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("maximumSignificantDigits {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("localeMatcher {string}")]),t._v(": optional, number format option")]),t._v(" "),s("li",[s("code",[t._v("formatMatcher {string}")]),t._v(": optional, number format option")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Any specified number format options will have priority over "),e("code",[this._v("numberFormats")]),this._v(" of "),e("code",[this._v("VueI18n")]),this._v(" constructor.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"danger custom-block"},[e("p",{staticClass:"custom-block-title"},[this._v("Tip")]),this._v(" "),e("p",[this._v("Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in "),e("code",[this._v("data")]),this._v(" options, "),e("code",[this._v("const $d = this.$d.bind(this)")]),this._v(").")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"injected-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#injected-properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Injected properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i18n-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n-2","aria-hidden":"true"}},[this._v("#")]),this._v(" $i18n")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("I18n")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Get a "),e("code",[this._v("VueI18n")]),this._v(" instance. If you are specify.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If you have specified an "),e("code",[this._v("i18n")]),this._v(" option at component options, you will be able to get a "),e("code",[this._v("VueI18n")]),this._v(" instance at the component, Otherwise, you will be able get root "),e("code",[this._v("VueI18n")]),this._v(" instance.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"vuei18n-class"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vuei18n-class","aria-hidden":"true"}},[this._v("#")]),this._v(" "),e("code",[this._v("VueI18n")]),this._v(" class")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"static-properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#static-properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Static properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"version"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version","aria-hidden":"true"}},[this._v("#")]),this._v(" version")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("string")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"availabilities"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#availabilities","aria-hidden":"true"}},[this._v("#")]),this._v(" availabilities")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("IntlAvailability")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("code",[this._v("{boolean} dateTimeFormat")]),this._v(": locale sensitive datetime formatting")])]),this._v(" "),e("li",[e("p",[e("code",[this._v("{boolean} numberFormat")]),this._v(": locale sensitive number formatting")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"constructor-options"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#constructor-options","aria-hidden":"true"}},[this._v("#")]),this._v(" Constructor options")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#locale","aria-hidden":"true"}},[this._v("#")]),this._v(" locale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("'en-US'")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbacklocale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbacklocale","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackLocale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("'en-US'")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"messages"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#messages","aria-hidden":"true"}},[this._v("#")]),this._v(" messages")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("LocaleMessages")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"datetimeformats"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#datetimeformats","aria-hidden":"true"}},[this._v("#")]),this._v(" dateTimeFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("DateTimeFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"numberformats"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#numberformats","aria-hidden":"true"}},[this._v("#")]),this._v(" numberFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("NumberFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("{}")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"formatter"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatter","aria-hidden":"true"}},[this._v("#")]),this._v(" formatter")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Formatter")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" Built in formatter")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("The formatter that implemented with "),e("code",[this._v("Formatter")]),this._v(" interface.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"missing"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#missing","aria-hidden":"true"}},[this._v("#")]),this._v(" missing")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("MissingHandler")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("null")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbackroot"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbackroot","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackRoot")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("true")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("false")]),this._v(", it's warned, and is returned the key.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"sync"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#sync","aria-hidden":"true"}},[this._v("#")]),this._v(" sync")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("true")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("false")]),this._v(", regardless of the root level locale, localize for each component locale.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"silenttranslationwarn"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#silenttranslationwarn","aria-hidden":"true"}},[this._v("#")]),this._v(" silentTranslationWarn")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Default:")]),this._v(" "),e("code",[this._v("false")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("If "),e("code",[this._v("true")]),this._v(", supress localization fail warnings.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"properties"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#properties","aria-hidden":"true"}},[this._v("#")]),this._v(" Properties")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"locale-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#locale-2","aria-hidden":"true"}},[this._v("#")]),this._v(" locale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"fallbacklocale-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fallbacklocale-2","aria-hidden":"true"}},[this._v("#")]),this._v(" fallbackLocale")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Locale")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"messages-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#messages-2","aria-hidden":"true"}},[this._v("#")]),this._v(" messages")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("LocaleMessages")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"datetimeformats-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#datetimeformats-2","aria-hidden":"true"}},[this._v("#")]),this._v(" dateTimeFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("DateTimeFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"numberformats-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#numberformats-2","aria-hidden":"true"}},[this._v("#")]),this._v(" numberFormats")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("NumberFormats")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read only")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"missing-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#missing-2","aria-hidden":"true"}},[this._v("#")]),this._v(" missing")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("MissingHandler")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"formatter-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#formatter-2","aria-hidden":"true"}},[this._v("#")]),this._v(" formatter")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("Formatter")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("The formatter that implemented with "),e("code",[this._v("Formatter")]),this._v(" interface.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"silenttranslationwarn-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#silenttranslationwarn-2","aria-hidden":"true"}},[this._v("#")]),this._v(" silentTranslationWarn")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Type:")]),this._v(" "),e("code",[this._v("boolean")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Read/Write")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"methods"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#methods","aria-hidden":"true"}},[this._v("#")]),this._v(" Methods")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getlocalemessage-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getlocalemessage-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getLocaleMessage( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("LocaleMessageObject")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setlocalemessage-locale-message"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setlocalemessage-locale-message","aria-hidden":"true"}},[this._v("#")]),this._v(" setLocaleMessage( locale, message )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{LocaleMessageObject} message")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergelocalemessage-locale-message"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergelocalemessage-locale-message","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeLocaleMessage( locale, message )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("6.1+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{LocaleMessageObject} message")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"t-key-locale-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#t-key-locale-values","aria-hidden":"true"}},[this._v("#")]),this._v(" t( key, [locale], [values] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" : "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as the "),e("code",[this._v("Function")]),this._v(" returned with "),e("code",[this._v("$t")]),this._v(" method. More detail see "),e("a",{attrs:{href:"#t"}},[this._v("$t")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"i-key-locale-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i-key-locale-values","aria-hidden":"true"}},[this._v("#")]),this._v(" i( key, [locale], [values] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Array} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" : "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"tc-key-choice-values"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#tc-key-choice-values","aria-hidden":"true"}},[this._v("#")]),this._v(" tc( key, [choice], [values] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{Path} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{number} choice")]),t._v(": optional, default "),s("code",[t._v("1")])]),t._v(" "),s("li",[s("code",[t._v("{string | Array | Object} values")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("TranslateResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as the "),e("code",[this._v("Function")]),this._v(" returned "),e("code",[this._v("$tc")]),this._v(" method. More detail see "),e("a",{attrs:{href:"#tc"}},[this._v("$tc")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"te-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#te-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" te( key, [locale] )")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{string} key")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("boolean")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Check whether key path exists in global locale message. If you specified "),e("code",[this._v("locale")]),this._v(", check the locale message of "),e("code",[this._v("locale")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getdatetimeformat-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getdatetimeformat-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getDateTimeFormat ( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("DateTimeFormat")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setdatetimeformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setdatetimeformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" setDateTimeFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{DateTimeFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergedatetimeformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergedatetimeformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeDateTimeFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{DateTimeFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"d-value-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#d-value-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" d( value, [key], [locale] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number | Date} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale | Object} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("DateTimeFormatResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as "),e("code",[this._v("$d")]),this._v(" method of Vue instance method. More detail see "),e("a",{attrs:{href:"#d"}},[this._v("$d")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"getnumberformat-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getnumberformat-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" getNumberFormat ( locale )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Return:")]),this._v(" "),e("code",[this._v("NumberFormat")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"setnumberformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#setnumberformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" setNumberFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{NumberFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"mergenumberformat-locale-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mergenumberformat-locale-format","aria-hidden":"true"}},[this._v("#")]),this._v(" mergeNumberFormat ( locale, format )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Arguments:")])]),this._v(" "),e("ul",[e("li",[e("code",[this._v("{Locale} locale")])]),this._v(" "),e("li",[e("code",[this._v("{NumberFormat} format")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"n-value-key-locale"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#n-value-key-locale","aria-hidden":"true"}},[this._v("#")]),this._v(" n( value, [key], [locale] )")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("p",[s("strong",[t._v("Arguments:")])]),t._v(" "),s("ul",[s("li",[s("code",[t._v("{number} value")]),t._v(": required")]),t._v(" "),s("li",[s("code",[t._v("{Path | Object} key")]),t._v(": optional")]),t._v(" "),s("li",[s("code",[t._v("{Locale} locale")]),t._v(": optional")])])]),t._v(" "),s("li",[s("p",[s("strong",[t._v("Return:")]),t._v(" "),s("code",[t._v("NumberFormatResult")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("This is the same as "),e("code",[this._v("$n")]),this._v(" method of Vue instance method. More detail see "),e("a",{attrs:{href:"#n"}},[this._v("$n")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"directives"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#directives","aria-hidden":"true"}},[this._v("#")]),this._v(" Directives")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.3+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"v-t"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#v-t","aria-hidden":"true"}},[this._v("#")]),this._v(" v-t")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("p",[e("strong",[this._v("Expects:")]),this._v(" "),e("code",[this._v("string | Object")])])]),this._v(" "),e("li",[e("p",[e("strong",[this._v("Details:")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("Update the element "),e("code",[this._v("textContent")]),this._v(" that localized with locale messages. You can use string syntax or object syntax. string syntax can be specified as a keypath of locale messages. If you can be used object syntax, you need to specify as the object key the following params:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("pre",[e("code",[this._v("* path: required, key of locale messages\n* locale: optional, locale\n* args: optional, for list or named formatting\n")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",[e("li",[e("strong",[this._v("Examples:")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- string syntax: literal --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("foo.bar"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- string syntax: binding via data or computed props --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("msg"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- object syntax: literal --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ path: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("hi"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(", locale: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("ja"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(", args: { name: "),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v("kazupon"),s("span",{attrs:{class:"token punctuation"}},[t._v("'")]),t._v(" } }"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n\n"),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- object syntax: binding via data or computed props --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("p")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("v-t")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("{ path: greeting, args: { name: fullName } }"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"components"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#components","aria-hidden":"true"}},[this._v("#")]),this._v(" Components")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"i18n-functional-component"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#i18n-functional-component","aria-hidden":"true"}},[this._v("#")]),this._v(" i18n functional component")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.0+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"props"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#props","aria-hidden":"true"}},[this._v("#")]),this._v(" Props:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",[s("li",[s("code",[t._v("path {Path}")]),t._v(": required, keypath of locale messages")]),t._v(" "),s("li",[s("code",[t._v("locale {Locale}")]),t._v(": optional, locale")]),t._v(" "),s("li",[s("code",[t._v("tag {string}")]),t._v(": optional, default "),s("code",[t._v("span")])]),t._v(" "),s("li",[s("code",[t._v("places {Array | Object}")]),t._v(": optional (7.2+)")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage","aria-hidden":"true"}},[this._v("#")]),this._v(" Usage:")])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-html extra-class"},[s("pre",{pre:!0,attrs:{class:"language-html"}},[s("code",[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("div")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("id")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("app"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("i18n")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("path")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("term"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("tag")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("label"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("for")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("tos"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("a")]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v(":href")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("url"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),t._v(" "),s("span",{attrs:{class:"token attr-name"}},[t._v("target")]),s("span",{attrs:{class:"token attr-value"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{attrs:{class:"token punctuation"}},[t._v('"')]),t._v("_blank"),s("span",{attrs:{class:"token punctuation"}},[t._v('"')])]),s("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("{{ $t('tos') }}"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n "),s("span",{attrs:{class:"token comment"}},[t._v("\x3c!-- ... --\x3e")]),t._v("\n"),s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token tag"}},[s("span",{attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" messages "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n en"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n tos"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'Term of Service'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n term"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'I accept xxx {0}.'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n ja"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n tos"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'利用規約'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n term"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'私は xxx の{0}に同意します。'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{attrs:{class:"token keyword"}},[t._v("const")]),t._v(" i18n "),s("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{attrs:{class:"token class-name"}},[t._v("VueI18n")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n locale"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'en'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n messages\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{attrs:{class:"token class-name"}},[t._v("Vue")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n i18n"),s("span",{attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n data"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n url"),s("span",{attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{attrs:{class:"token string"}},[t._v("'/term'")]),t._v("\n "),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{attrs:{class:"token function"}},[t._v("$mount")]),s("span",{attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{attrs:{class:"token string"}},[t._v("'#app'")]),s("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"see-also"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#see-also","aria-hidden":"true"}},[this._v("#")]),this._v(" See also:")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"special-attributes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#special-attributes","aria-hidden":"true"}},[this._v("#")]),this._v(" Special Attributes")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h3",{attrs:{id:"place"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#place","aria-hidden":"true"}},[this._v("#")]),this._v(" place")])},function(){var t=this.$createElement,e=this._self._c||t;return e("blockquote",[e("p",[this._v("🆕 7.2+")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"expects-number-string"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#expects-number-string","aria-hidden":"true"}},[this._v("#")]),this._v(" Expects: "),e("code",[this._v("{number | string}")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h4",{attrs:{id:"see-also-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#see-also-2","aria-hidden":"true"}},[this._v("#")]),this._v(" See also:")])}],!1,null,null,null);n.options.__file="README.md";e.default=n.exports}}]); \ No newline at end of file diff --git a/docs/assets/js/app.2d94bdde.js b/docs/assets/js/app.b6e63c45.js similarity index 72% rename from docs/assets/js/app.2d94bdde.js rename to docs/assets/js/app.b6e63c45.js index 4cb930516..31c1f451a 100644 --- a/docs/assets/js/app.2d94bdde.js +++ b/docs/assets/js/app.b6e63c45.js @@ -1,8 +1,8 @@ -!function(t){function e(e){for(var n,r,o=e[0],a=e[1],s=0,c=[];s=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(3),i=n(30)(3);r(r.P+r.F*!n(19)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(7).f,i=n(14),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(3);r(r.S+r.F,"Object",{assign:n(98)})},function(t,e,n){var r=n(76),i=n(61);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(59),i=n(15);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(27),i=n(25);n(79)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){"use strict";var r=n(3),i=n(30)(0),o=n(19)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(9),i=n(59),o=n(27),a=n(55),s=n(106);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=o(e),y=i(g),b=r(s,h,3),_=a(y.length),x=0,w=n?d(e,_):c?d(e,0):void 0;_>x;x++)if((p||x in y)&&(m=b(v=y[x],x,g),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:u||l?l:w}}},function(t,e,n){"use strict";var r=n(3),i=n(30)(2);r(r.P+r.F*!n(19)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(3),i=n(30)(1);r(r.P+r.F*!n(19)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){n(66)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r,i; +!function(t){function e(e){for(var n,r,o=e[0],a=e[1],s=0,u=[];s=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(3),i=n(30)(3);r(r.P+r.F*!n(19)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(7).f,i=n(14),o=n(1)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(3);r(r.S+r.F,"Object",{assign:n(98)})},function(t,e,n){var r=n(76),i=n(61);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(59),i=n(15);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(15);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(27),i=n(25);n(79)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){"use strict";var r=n(3),i=n(30)(0),o=n(19)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(9),i=n(59),o=n(27),a=n(55),s=n(106);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,d=e||s;return function(e,s,h){for(var v,m,g=o(e),y=i(g),b=r(s,h,3),_=a(y.length),x=0,w=n?d(e,_):u?d(e,0):void 0;_>x;x++)if((p||x in y)&&(m=b(v=y[x],x,g),t))if(n)w[x]=m;else if(m)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(l)return!1;return f?-1:c||l?l:w}}},function(t,e,n){"use strict";var r=n(3),i=n(30)(2);r(r.P+r.F*!n(19)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(3),i=n(30)(1);r(r.P+r.F*!n(19)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){n(66)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){var r,i; /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT */void 0===(i="function"==typeof(r=function(){var t={version:"0.2.0"},e=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function n(t,e,n){return tn?n:t}function r(t){return 100*(-1+t)}t.configure=function(t){var n,r;for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&(e[n]=r);return this},t.status=null,t.set=function(a){var s=t.isStarted();a=n(a,e.minimum,1),t.status=1===a?null:a;var c=t.render(!s),u=c.querySelector(e.barSelector),l=e.speed,f=e.easing;return c.offsetWidth,i(function(n){""===e.positionUsing&&(e.positionUsing=t.getPositioningCSS()),o(u,function(t,n,i){var o;return(o="translate3d"===e.positionUsing?{transform:"translate3d("+r(t)+"%,0,0)"}:"translate"===e.positionUsing?{transform:"translate("+r(t)+"%,0)"}:{"margin-left":r(t)+"%"}).transition="all "+n+"ms "+i,o}(a,l,f)),1===a?(o(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout(function(){o(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout(function(){t.remove(),n()},l)},l)):setTimeout(n,l)}),this},t.isStarted=function(){return"number"==typeof t.status},t.start=function(){t.status||t.set(0);var n=function(){setTimeout(function(){t.status&&(t.trickle(),n())},e.trickleSpeed)};return e.trickle&&n(),this},t.done=function(e){return e||t.status?t.inc(.3+.5*Math.random()).set(1):this},t.inc=function(e){var r=t.status;return r?("number"!=typeof e&&(e=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+e,0,.994),t.set(r)):t.start()},t.trickle=function(){return t.inc(Math.random()*e.trickleRate)},function(){var e=0,n=0;t.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&t.start(),e++,n++,r.always(function(){0==--n?(e=0,t.done()):t.set((e-n)/e)}),this):this}}(),t.render=function(n){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var i=document.createElement("div");i.id="nprogress",i.innerHTML=e.template;var a,c=i.querySelector(e.barSelector),u=n?"-100":r(t.status||0),f=document.querySelector(e.parent);return o(c,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),e.showSpinner||(a=i.querySelector(e.spinnerSelector))&&l(a),f!=document.body&&s(f,"nprogress-custom-parent"),f.appendChild(i),i},t.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(e.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&l(t)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var i=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),o=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=function(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})}(n),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,i=t.length,o=e.charAt(0).toUpperCase()+e.slice(1);i--;)if((r=t[i]+o)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,i,o=arguments;if(2==o.length)for(n in e)void 0!==(i=e[n])&&e.hasOwnProperty(n)&&r(t,n,i);else r(t,o[1],o[2])}}();function a(t,e){var n="string"==typeof t?t:u(t);return n.indexOf(" "+e+" ")>=0}function s(t,e){var n=u(t),r=n+e;a(n,e)||(t.className=r.substring(1))}function c(t,e){var n,r=u(t);a(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function u(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function l(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return t})?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e){t.exports=!1},function(t,e,n){var r=n(4),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(9),i=n(89),o=n(90),a=n(8),s=n(55),c=n(91),u={},l={};(e=t.exports=function(t,e,n,f,p){var d,h,v,m,g=p?function(){return t}:c(t),y=r(n,f,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(d=s(t.length);d>b;b++)if((m=e?y(a(h=t[b])[0],h[1]):y(t[b]))===u||m===l)return m}else for(v=g.call(t);!(h=v.next()).done;)if((m=i(v,y,h.value,e))===u||m===l)return m}).BREAK=u,e.RETURN=l},function(t,e,n){var r=n(56),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(11);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(2),i=n(7),o=n(6),a=n(1)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(69)("keys"),i=n(22);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(22)("meta"),i=n(4),o=n(14),a=n(7).f,s=0,c=Object.isExtensible||function(){return!0},u=!n(5)(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&c(t)&&!o(t,r)&&l(t),t}}},function(t,e,n){"use strict";var r=n(50),i=n(3),o=n(11),a=n(10),s=n(17),c=n(103),u=n(23),l=n(105),f=n(1)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,h,v,m,g){c(n,e,h);var y,b,_,x=function(t){if(!p&&t in $)return $[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",k="values"==v,C=!1,$=t.prototype,S=$[f]||$["@@iterator"]||v&&$[v],O=S||x(v),E=v?k?x("entries"):O:void 0,A="Array"==e&&$.entries||S;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(u(_,w,!0),r||"function"==typeof _[f]||a(_,f,d)),k&&S&&"values"!==S.name&&(C=!0,O=function(){return S.call(this)}),r&&!g||!p&&!C&&$[f]||a($,f,O),s[e]=O,s[w]=d,v)if(y={values:k?O:x("values"),keys:m?O:x("keys"),entries:E},g)for(b in y)b in $||o($,b,y[b]);else i(i.P+i.F*(p||C),e,y);return y}},function(t,e,n){var r=n(7).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(6)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(3),i=n(77)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(19)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(10),i=n(11),o=n(5),a=n(15),s=n(1);t.exports=function(t,e,n){var c=s(t),u=n(a,c,""[t]),l=u[0],f=u[1];o(function(){var e={};return e[c]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,l),r(RegExp.prototype,c,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){"use strict";var r,i,o,a,s=n(50),c=n(2),u=n(9),l=n(68),f=n(3),p=n(4),d=n(21),h=n(53),v=n(54),m=n(92),g=n(72).set,y=n(94)(),b=n(74),_=n(95),x=n(96),w=n(97),k=c.TypeError,C=c.process,$=C&&C.versions,S=$&&$.v8||"",O=c.Promise,E="process"==l(C),A=function(){},j=i=b.f,T=!!function(){try{var t=O.resolve(1),e=(t.constructor={})[n(1)("species")]=function(t){t(A,A)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof e&&0!==S.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),L=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},P=function(t,e){if(!t._n){t._n=!0;var n=t._c;y(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a,s=i?e.ok:e.fail,c=e.resolve,u=e.reject,l=e.domain;try{s?(i||(2==t._h&&R(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?u(k("Promise-chain cycle")):(o=L(n))?o.call(n,c,u):c(n)):u(r)}catch(t){l&&!a&&l.exit(),u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){g.call(c,function(){var e,n,r,i=t._v,o=M(t);if(o&&(e=_(function(){E?C.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||M(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},M=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){g.call(c,function(){var e;E?C.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),P(e,!0))},U=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw k("Promise can't be resolved itself");(e=L(t))?y(function(){var r={_w:n,_d:!1};try{e.call(t,u(U,r,1),u(N,r,1))}catch(t){N.call(r,t)}}):(n._v=t,n._s=1,P(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};T||(O=function(t){h(this,O,"Promise","_h"),d(t),r.call(this);try{t(u(U,this,1),u(N,this,1))}catch(t){N.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(57)(O.prototype,{then:function(t,e){var n=j(m(this,O));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(U,t,1),this.reject=u(N,t,1)},b.f=j=function(t){return t===O||t===a?new o(t):i(t)}),f(f.G+f.W+f.F*!T,{Promise:O}),n(23)(O,"Promise"),n(58)("Promise"),a=n(13).Promise,f(f.S+f.F*!T,"Promise",{reject:function(t){var e=j(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!T),"Promise",{resolve:function(t){return w(s&&this===a?O:this,t)}}),f(f.S+f.F*!(T&&n(75)(function(t){O.all(t).catch(A)})),"Promise",{all:function(t){var e=this,n=j(e),r=n.resolve,i=n.reject,o=_(function(){var n=[],o=0,a=1;v(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,i=_(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e,n){var r=n(12),i=n(1)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(13),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(50)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){t.exports=!n(6)&&!n(5)(function(){return 7!=Object.defineProperty(n(51)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r,i,o,a=n(9),s=n(93),c=n(73),u=n(51),l=n(2),f=l.process,p=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,m=0,g={},y=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){y.call(t.data)};p&&d||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++m]=function(){s("function"==typeof t?t:Function(t),e)},r(m),m},d=function(t){delete g[t]},"process"==n(12)(f)?r=function(t){f.nextTick(a(y,t,1))}:v&&v.now?r=function(t){v.now(a(y,t,1))}:h?(o=(i=new h).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:p,clear:d}},function(t,e,n){var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(21);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){var r=n(1)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){var r=n(14),i=n(26),o=n(77)(!1),a=n(60)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(26),i=n(55),o=n(99);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(3),i=n(13),o=n(5);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(8),i=n(104),o=n(61),a=n(60)("IE_PROTO"),s=function(){},c=function(){var t,e=n(51)("iframe"),r=o.length;for(e.style.display="none",n(73).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" + diff --git a/docs/guide/datetime.html b/docs/guide/datetime.html index a840270ff..f1455278b 100644 --- a/docs/guide/datetime.html +++ b/docs/guide/datetime.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/directive.html b/docs/guide/directive.html index 826fdb95e..6b5fe6e37 100644 --- a/docs/guide/directive.html +++ b/docs/guide/directive.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/fallback.html b/docs/guide/fallback.html index 25456127d..34725a76b 100644 --- a/docs/guide/fallback.html +++ b/docs/guide/fallback.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/formatting.html b/docs/guide/formatting.html index 7a9da474b..47581fd7b 100644 --- a/docs/guide/formatting.html +++ b/docs/guide/formatting.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/hot-reload.html b/docs/guide/hot-reload.html index a3cddea38..1b87101e5 100644 --- a/docs/guide/hot-reload.html +++ b/docs/guide/hot-reload.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/interpolation.html b/docs/guide/interpolation.html index 2dac6abc0..5ed901955 100644 --- a/docs/guide/interpolation.html +++ b/docs/guide/interpolation.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/lazy-loading.html b/docs/guide/lazy-loading.html index 452c6137b..0656303b7 100644 --- a/docs/guide/lazy-loading.html +++ b/docs/guide/lazy-loading.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/locale.html b/docs/guide/locale.html index 49dbe4893..52548be4b 100644 --- a/docs/guide/locale.html +++ b/docs/guide/locale.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/messages.html b/docs/guide/messages.html index 340771c0d..c24358008 100644 --- a/docs/guide/messages.html +++ b/docs/guide/messages.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/migrations.html b/docs/guide/migrations.html index 88ce0d0c5..ac15d9b6a 100644 --- a/docs/guide/migrations.html +++ b/docs/guide/migrations.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/number.html b/docs/guide/number.html index a5efeb9d3..4b36d3ea6 100644 --- a/docs/guide/number.html +++ b/docs/guide/number.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/docs/guide/pluralization.html b/docs/guide/pluralization.html index 982193540..b5b9b9e64 100644 --- a/docs/guide/pluralization.html +++ b/docs/guide/pluralization.html @@ -7,8 +7,8 @@ - - + +
- + diff --git a/docs/introduction.html b/docs/introduction.html index 1c3fb3ceb..57fc28b7f 100644 --- a/docs/introduction.html +++ b/docs/introduction.html @@ -7,8 +7,8 @@ - - + + - + diff --git a/vuepress/api/README.md b/vuepress/api/README.md index c386be021..826d70ffd 100644 --- a/vuepress/api/README.md +++ b/vuepress/api/README.md @@ -333,6 +333,20 @@ Whether suppress warnings outputted when localization fails. ### Methods +#### getChoiceIndex + + * **Arguments:** + * `{number} choice` + * `{number} choicesLength` + + * **Return:** `finalChoice {number}` + +Get pluralization index for current pluralizing number and a given amount of choices. Can be overriden through prototype mutation: + +```js +VueI18n.prototype.getChoiceIndex = /* custom implementation */ +``` + #### getLocaleMessage( locale ) * **Arguments:** diff --git a/vuepress/guide/pluralization.md b/vuepress/guide/pluralization.md index ee015d591..31cf95cae 100644 --- a/vuepress/guide/pluralization.md +++ b/vuepress/guide/pluralization.md @@ -75,6 +75,83 @@ Output the below: ``` +## Custom pluralization + +Such pluralization, however, does not apply to all languages (Slavic languages, for example, have different pluralization rules). + +In order to implement these rules you can override the `VueI18n.prototype.getChoiceIndex` function. + +Very simplified example using rules for Slavic langauges (Russian, Ukrainian, etc.): +```js +/** + * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)` + * @param choiceLength {number} an overall amount of available choices + * @returns a final choice index to select plural word by +**/ +VueI18n.prototype.getChoiceIndex = function (choice, choicesLength) { + // this === VueI18n instance, so the locale property also exists here + if (this.locale !== 'ru') { + // proceed to the default implementation + } + + if (choice === 0) { + return 0; + } + + const teen = choice > 10 && choice < 20; + const endsWithOne = choice % 10 === 1; + + if (!teen && endsWithOne) { + return 1; + } + + if (!teen && choice % 10 >= 2 && choice % 10 <= 4) { + return 2; + } + + return (choicesLength < 4) ? 2 : 3; +} +``` + +This would effectively give this: +```javascript +const messages = { + ru: { + car: '0 машин | 1 машина | {n} машины | {n} машин', + banana: 'нет бананов | 1 банан | {n} банана | {n} бананов' + } +} +``` +Where the format is `0 things | 1 thing | few things | multiple things`. + +Your template still needs to use `$tc()`, not `$t()`: + +```html +

{{ $tc('car', 1) }}

+

{{ $tc('car', 2) }}

+

{{ $tc('car', 4) }}

+

{{ $tc('car', 12) }}

+

{{ $tc('car', 21) }}

+ +

{{ $tc('car', 0) }}

+

{{ $tc('car', 4) }}

+

{{ $tc('car', 11) }}

+

{{ $tc('car', 31) }}

+``` +Which results in: + +```html +

1 машина

+

2 машины

+

4 машины

+

12 машин

+

21 машина

+ +

нет бананов

+

4 банана

+

11 бананов

+

31 банан

+```