UNPKG

insight-ui-mangacoin

Version:

An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the monacoin network and build your own services with it.

41 lines (33 loc) 1.01 kB
'use strict'; angular.module('insight.system').controller('FooterController', function($scope, $route, $templateCache, gettextCatalog, amMoment, Version) { $scope.defaultLanguage = defaultLanguage; var _getVersion = function() { Version.get({}, function(res) { $scope.version = res.version; }); }; $scope.version = _getVersion(); $scope.availableLanguages = [{ name: 'Deutsch', isoCode: 'de_DE', }, { name: 'English', isoCode: 'en', }, { name: 'Spanish', isoCode: 'es', }, { name: 'Japanese', isoCode: 'ja', }]; $scope.setLanguage = function(isoCode) { gettextCatalog.currentLanguage = $scope.defaultLanguage = defaultLanguage = isoCode; amMoment.changeLocale(isoCode); localStorage.setItem('insight-language', isoCode); var currentPageTemplate = $route.current.templateUrl; $templateCache.remove(currentPageTemplate); $route.reload(); }; });