summaryrefslogtreecommitdiffstats
path: root/js/app/Config.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/app/Config.js')
-rw-r--r--js/app/Config.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/app/Config.js b/js/app/Config.js
index c711b92c3..df7cc60e5 100644
--- a/js/app/Config.js
+++ b/js/app/Config.js
@@ -137,16 +137,21 @@ app.config(function ($routeProvider, $provide, $httpProvider) {
var getExploreResolve = function () {
return {
sites: /* @ngInject */ function (
- $http, $q, BASE_URL, Publisher, SettingsResource) {
+ $http, $q, BASE_URL, $location, Publisher, SettingsResource) {
var deferred = $q.defer();
+ // always use the code from the url
+ var language = $location.search().lang;
+ if (!language) {
+ language = SettingsResource.get('language');
+ }
+
$http.get(BASE_URL + '/settings').then(function (data) {
Publisher.publishAll(data);
// get url and strip trailing slashes
var url = SettingsResource.get('exploreUrl')
.replace(/\/+$/, '');
- var language = SettingsResource.get('language');
var exploreUrl = url + '/feeds.' + language + '.json';
var defaultExploreUrl = url + '/feeds.en.json';