From 1b7ee3203787ab09d7a3af5f2a64b27a8a1ae83a Mon Sep 17 00:00:00 2001 From: Myf Date: Fri, 30 Oct 2015 15:53:40 +0800 Subject: [PATCH] Add change Language button. --- index.html | 30 ++++++++++++++++++++++++++++++ js/ctrls/nav.js | 10 +++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index a2f813a..0713ed2 100755 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@ + @@ -74,6 +75,7 @@ + @@ -206,6 +208,34 @@ + + + + diff --git a/js/ctrls/nav.js b/js/ctrls/nav.js index 99f1581..dd9565b 100644 --- a/js/ctrls/nav.js +++ b/js/ctrls/nav.js @@ -8,12 +8,12 @@ angular '$scope', '$modals', '$rpc', '$rpchelpers', '$fileSettings', '$globalSettings', '$globalExclude', - '$utils', + '$utils', '$translate', function( scope, modals, rpc, rhelpers, fsettings, gsettings, gexclude, - utils + utils, translate ) { scope.isFeatureEnabled = function(f) { return rhelpers.isFeatureEnabled(f) }; @@ -131,6 +131,10 @@ angular modals.invoke( 'about' ); - } + }; + + scope.changeLanguage = function (langkey) { + translate.use(langkey); + }; }]);