forked from Archives/Athou_commafeed
i18n implementation (#55)
This commit is contained in:
@@ -793,19 +793,12 @@ function($scope, $state, $stateParams, $dialog, AdminUsersService) {
|
||||
};
|
||||
}]);
|
||||
|
||||
module.controller('SettingsCtrl', ['$scope', '$location', 'SettingsService', 'AnalyticsService',
|
||||
function($scope, $location, SettingsService, AnalyticsService) {
|
||||
module.controller('SettingsCtrl', ['$scope', '$location', 'SettingsService', 'AnalyticsService', 'ServerService',
|
||||
function($scope, $location, SettingsService, AnalyticsService, ServerService) {
|
||||
|
||||
AnalyticsService.track();
|
||||
|
||||
|
||||
$scope.languages = [ {
|
||||
id : 'en',
|
||||
label : 'English'
|
||||
}, {
|
||||
id : 'fr',
|
||||
label : 'Français'
|
||||
} ];
|
||||
$scope.ServerService = ServerService.get();
|
||||
|
||||
$scope.settingsService = SettingsService;
|
||||
$scope.$watch('settingsService.settings', function(value) {
|
||||
|
||||
@@ -34,6 +34,7 @@ module.factory('SettingsService', ['$resource', function($resource) {
|
||||
s.init = function(callback) {
|
||||
res.get(function(data) {
|
||||
s.settings = data;
|
||||
moment.lang(s.settings.language || 'en');
|
||||
if (callback) {
|
||||
callback(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user