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 {
47
47
</i18n>
48
48
```
49
49
50
+ The locale messages defined at ` i18n ` custom blocks are ** json format default** .
51
+
50
52
### Source importing
51
53
52
54
you also can:
@@ -88,6 +90,38 @@ You can define locale messages for each locale with `locale` attr in single-file
88
90
The above defines two locales, which are merged at target single-file components.
89
91
90
92
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
+
91
125
### JavaScript
92
126
93
127
``` javascript
You can’t perform that action at this time.
0 commit comments