From fc3b8bc05bf9e5418cf3ce43961fb0d6d7993f2a Mon Sep 17 00:00:00 2001 From: Antony Alexsandrov Date: Sun, 10 Apr 2016 16:48:16 +0300 Subject: [PATCH] close #7 internationalization angular complete --- app/index.html | 6 ++++++ app/scripts/app.js | 12 +++++++----- app/templates/win.html | 8 ++++---- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/index.html b/app/index.html index 513f501..6805d25 100644 --- a/app/index.html +++ b/app/index.html @@ -69,6 +69,12 @@ + + + + + + diff --git a/app/scripts/app.js b/app/scripts/app.js index 823ea25..8a4fe4f 100644 --- a/app/scripts/app.js +++ b/app/scripts/app.js @@ -156,15 +156,17 @@ this.checkState(); }; + var _isRussian = true; this.changeLanguage = function () { - console.log($translate); - if ($translate.langKey == 'ru') { + if(_isRussian) { $translate.use('en'); - } else { + _isRussian = false; + } + else { $translate.use('ru'); + _isRussian = true; } - $translate.$nextLang; - }; + } }]); app.controller('GameController', diff --git a/app/templates/win.html b/app/templates/win.html index 971b470..783887a 100644 --- a/app/templates/win.html +++ b/app/templates/win.html @@ -10,10 +10,9 @@
-

Этот снимок сделан при помощи - EzSensor от VATECH

+

{{'WIN_MESSAGE'|translate}}

- +
@@ -22,7 +21,8 @@
- +