dayspan-vuetify
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"name": "dayspan-vuetify", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "A collection of components for Schedules and Calendars in DaySpan using Vuetify", | ||
@@ -5,0 +5,0 @@ "author": "Philip Diffenderfer <pdiffenderfer@gmail.com>", |
@@ -23,3 +23,3 @@ # dayspan-vuetify | ||
```babel | ||
```javascript | ||
import DaySpanVuetify from 'dayspan-vuetify' | ||
@@ -54,3 +54,3 @@ | ||
#### app.js | ||
```babel | ||
```javascript | ||
import Vue from 'vue' | ||
@@ -128,2 +128,30 @@ import Vuetify from 'vuetify' | ||
### Locales | ||
This library supports multiple locales but comes only with [en-us/en](https://github.com/ClickerMonkey/dayspan-vuetify/blob/master/src/locales/en.js). The following code shows you how to add locales, changing the current locale, and updating a given locale: | ||
```javascript | ||
// You can access $dayspan via Vue.$dayspan or this.$dayspan inside a component. | ||
$dayspan.setLocale('en'); // if en does not exist, this will have no affect | ||
$dayspan.setLocale('fr', true); // true was passed, so if the locale does not exist an error is thrown | ||
$dayspan.locales; // map of locale names to locale values | ||
// A locale is really just an object that overrides the values you specify found in $dayspan. A locale does not need to specify all possible values, just ones that should be overriden when setLocale is called. | ||
$dayspan.addLocale('es', { | ||
promptLabels: { | ||
// Are you sure you want to remove this event? | ||
actionRemove: '¿Estás seguro de que quieres eliminar este evento?' | ||
} | ||
}); | ||
// Update locale (merge changes into locale) | ||
$dayspan.updateLocale('en', { | ||
patterns: { | ||
lastDay: (day) => 'Final day of the month' | ||
} | ||
}); | ||
``` | ||
## Build Setup | ||
@@ -130,0 +158,0 @@ |
@@ -145,2 +145,4 @@ | ||
dsMergeLocale(this, locale, name); | ||
this.currentLocale = name; | ||
} | ||
@@ -147,0 +149,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1820582
3007
171