Organizational Research By

Surprising Reserch Topic

localstorage angular translate


localstorage angular translate  using -'angularjs,angular-translate,angular-local-storage'

I am new in angular-translate in my Angular app.

Requirement :

I have to create multi language application in AngularJS where user have a option to set his language. So, for that I have to loading translations from files and save that preferred language in LocalStorage.
So that if user come again to access the application he will be displayed his previously set language.

What i have done so far :

loading translations from files by using $translateProvider.useStaticFilesLoader

Code :

var app = angular.module("myLangApp", ['pascalprecht.translate'])
app.config(function($translateProvider) {
$translateProvider.useStaticFilesLoader({
        prefix: 'languages/',
        suffix: '.json'
      });
    $translateProvider.useLocalStorage();
});


Application working fine if i comment this line

// $translateProvider.useLocalStorage();


But if i use i am getting this error on console :



I also included the angular-translate-storage-local.min.js file in index.html.But no success.

Any immediate help will be highly appreciable. Thanks
    
asked Oct 6, 2015 by rajesh
0 votes
10 views



Related Hot Questions



Government Jobs Opening


...