'use strict';

var JezikService = angular.module('jezik.services', [
    'system'
])
    .factory('JezikService', [
        '$http',
        '$q',
        'System',
        function ($http, $q, System, ArticleFactory) {

            var URL = {
                SET_CULTURE: '/cms/app/SetCulture' 
            };
    
            var setCulture = function (culture) {
                var deferred = $q.defer();
                $http.get(URL.SET_CULTURE, {
                    params: { culture: culture }
                }).success(function (data) {
                    deferred.resolve(data);
                });

                return deferred.promise;
            };

            return {
                setCulture: setCulture
            };
        }
    ]);