Angular Dynamic Locale
- AngularJS v1.0.7+ is currently required.
Changing the locale
This module defines two services, these are
tmhDynamicLocale provides has one method
change the locale.
Keep in mind that the locale will be changed asynchronously
After the locale is changed, the event
'$localeChangeSuccess' will be
tmhDynamicLocale.set will return a promise that will be resolved
when the locale is loaded and will resolve to the new locale.
tmhDynamicLocaleCache is a
$cache of all the loaded locales,
where the key is the locale id and the value is the locale object.
This module expects for the angular locales to be present at
If the locales are at another URL, this can be changed at
It is possible to specify a storage location for the locale using
tmhDynamicLocaleProvider.useStorage(storageName), the name of the
storage must follow the same signature as
$cookieStore. The default
storage location is to use a
$cache, this default storage is not persistent.
It is possible to ask the storage to be
$cookieStore using the shortcut
tmhDynamicLocaleProvider.useCookieStorage(), internally this is
exactly as performing
Add the module to your dependencies
Install Node.js and NPM (should come with)
Install global dependencies
Install local dependencies:
Running the tests
to run the test once
to run the tests continuously