angular-local-storage icon indicating copy to clipboard operation
angular-local-storage copied to clipboard

Any way to extract the current locale from storage

Open aligit opened this issue 9 years ago • 1 comments

I'm using webpack and therefore tmhDynamicLocaleProvider.useCookieStorage(); does not help at config.

Is there a way to extract the current locale ID from storage?

Best, Ali

aligit avatar Feb 12 '16 18:02 aligit

From angular-dynamic-locale's documentation

It is possible to ask the storage to be $cookieStore using the shortcut tmhDynamicLocaleProvider.useCookieStorage(), internally this is exactly as performing tmhDynamicLocaleProvider.useStorage('$cookieStore')

Reading their source code,

    storage = $injector.get(storageFactory);

where storageFactory is the name of the storage service. I have not yet used their library but try using

    tmhDynamicLocaleProvider.useStorage('localStorageService')

g2graman avatar Feb 18 '16 00:02 g2graman