Add change Language button.
This commit is contained in:
parent
62cab3ed7e
commit
1b7ee32037
30
index.html
30
index.html
|
@ -13,6 +13,7 @@
|
|||
|
||||
<link rel="stylesheet" href="css/bootstrap.css">
|
||||
<link rel="stylesheet" href="css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="css/flag-icon.min.css">
|
||||
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<link rel="stylesheet" href="css/download.css">
|
||||
|
@ -74,6 +75,7 @@
|
|||
|
||||
<!-- translate -->
|
||||
<script src="js/libs/angular-translate.js"></script>
|
||||
<script src="js/translate/en_US.js"></script>
|
||||
<script src="js/translate/th_TH.js"></script>
|
||||
<script src="js/translate/zh_CN.js"></script>
|
||||
</head>
|
||||
|
@ -206,6 +208,34 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown" dropdown>
|
||||
<a
|
||||
href="#"
|
||||
class="dropdown-toggle" dropdown-toggle>{{ 'Language' | translate }} <span class="caret"></span></a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a
|
||||
ng-click="changeLanguage('en_US')"
|
||||
href="#"><span class="fa fa-fw flag-icon flag-icon-us"> </span> English</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
ng-click="changeLanguage('th_TH')"
|
||||
href="#"><span class="fa fa-fw flag-icon flag-icon-th"> </span> Thai</a> <!-- TODO Thai translate -->
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
ng-click="changeLanguage('zh_CN')"
|
||||
href="#"><span class="fa fa-fw flag-icon flag-icon-cn"> </span> 简体中文</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- }}} -->
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user