fix language setting

This commit is contained in:
Matias Alejo Garcia 2014-12-05 14:26:01 -03:00
parent 93b287bedc
commit 98ab87611d
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.services').factory('configService', function(localstorageService) {
angular.module('copayApp.services').factory('configService', function(localstorageService, gettextCatalog) {
var root = {};
root.set = function(opts, cb) {
@ -8,6 +8,9 @@ angular.module('copayApp.services').factory('configService', function(localstora
if (opts.logLevel)
copay.logger.setLevel(opts.logLevel);
if (opts.defaultLanguage)
gettextCatalog.currentLanguage = opts.defaultLanguage;
localstorageService.getItem('config', function(err, oldOpsStr) {
var oldOpts = {};