File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ export default {
4747</i18n>
4848```
4949
50+ The locale messages defined at ` i18n ` custom blocks are ** json format default** .
51+
5052### Source importing
5153
5254you also can:
@@ -88,6 +90,38 @@ You can define locale messages for each locale with `locale` attr in single-file
8890The above defines two locales, which are merged at target single-file components.
8991
9092
93+ ### Locale Messages formatting
94+
95+ Besides json format, You can be used by specifying the following format in the ` lang ` attribute:
96+
97+ - yaml
98+ - json5
99+
100+ example yaml foramt:
101+
102+ ``` vue
103+ <i18n locale="en" lang="yaml">
104+ hello: "hello world!"
105+ </i18n>
106+
107+ <i18n locale="ja" lang="yml">
108+ hello: "こんにちは、世界!"
109+ </i18n>
110+ ```
111+
112+ example json5 format:
113+
114+ ``` vue
115+ <i18n lang="json5">
116+ {
117+ "en": {
118+ // comments
119+ "hello": "hello world!"
120+ }
121+ }
122+ </i18n>
123+ ```
124+
91125### JavaScript
92126
93127``` javascript
You can’t perform that action at this time.
0 commit comments