customBlocks
object
{ defaultSFCLang: 'json', globalSFCScope: false }
Configure the i18n
custom blocks of SFC.
Supported properties:
defaultSFCLang
string
Specify the content for all your inlined i18n custom blocks on your SFC.
defaultSFCLang
must have one of the following values:
On inlined i18n
custom blocks that have specified the lang
attribute, the defaultSFCLang
is not applied.
For example, with defaultSFCLang: "yaml"
or defaultSFCLang: "yml"
, this custom block:
<i18n lang="yaml">
en:
hello: Hello
es:
hello: Hola
</i18n>
and this another one, are equivalent:
<i18n>
en:
hello: Hello
es:
hello: Hola
</i18n>
globalSFCScope
boolean
false
Whether to include all i18n
custom blocks on your SFC on global scope.
If true
, it will be applied to all inlined i18n
or imported
custom blocks.
globalSFCScope: true
, all i18n
custom blocks in all your SFC
will be on global
scope.For example, with globalSFCScope: true
, this custom block:
<i18n lang="yaml" global>
en:
hello: Hello
es:
hello: Hola
</i18n>
And this one, are equivalent:
<i18n lang="yaml">
en:
hello: Hello
es:
hello: Hola
</i18n>
You can also use defaultSFCLang: "yaml"
, following with previous example, this one is also equivalent to previous ones:
<i18n>
en:
hello: Hello
es:
hello: Hola
</i18n>