@corvina/vue-components-library 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -2
- package/package.json +1 -1
- package/vue-components-library.cjs.js +1 -1
- package/vue-components-library.css +1 -1
- package/vue-components-library.es.js +327 -327
- package/vue-components-library.umd.js +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Corvina Components Library
|
|
2
|
-
|
|
2
|
+
This library is a collection of vue components aimed to be used in the Corvina App.
|
|
3
3
|
|
|
4
4
|
# Installation
|
|
5
5
|
|
|
@@ -13,7 +13,7 @@ npm install @corvina/vue-components-library
|
|
|
13
13
|
|
|
14
14
|
Add to your vue application the corvina components:
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```JavaScript
|
|
17
17
|
import { createApp } from 'vue'
|
|
18
18
|
import App from './App.vue'
|
|
19
19
|
import vuetify from './plugins/vuetify'
|
|
@@ -27,3 +27,30 @@ createApp(App)
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
and add reference to css and font to your code.
|
|
30
|
+
|
|
31
|
+
# Internationalization i18n
|
|
32
|
+
|
|
33
|
+
If you want to support internationalization, please remember to configure the locale in your Vuetify options.
|
|
34
|
+
|
|
35
|
+
```JavaScript
|
|
36
|
+
import { en, it, de } from 'vuetify/locale'
|
|
37
|
+
const vuetify = createVuetify({
|
|
38
|
+
...
|
|
39
|
+
locale: {
|
|
40
|
+
locale: 'en',
|
|
41
|
+
fallback: 'en',
|
|
42
|
+
messages: { en, it, de }
|
|
43
|
+
},
|
|
44
|
+
...
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
To dynamically change the language, use `this.$vuetify.locale.current`.
|
|
48
|
+
|
|
49
|
+
For example, in the Corvina application:
|
|
50
|
+
|
|
51
|
+
```JavaScript
|
|
52
|
+
this.$i18n.locale = locale?.replace('_', '-') || "en-US";
|
|
53
|
+
this.$vuetify.locale.current = this.$i18n.locale?.split('-')[0] || "en";
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
|