store and use preferred language from user (#55)

This commit is contained in:
Athou
2013-05-11 22:49:33 +02:00
parent dab151ce37
commit ca47270db1
9 changed files with 79 additions and 16 deletions

View File

@@ -13,7 +13,8 @@ app.factory('$templateCache', ['$cacheFactory', '$http', '$injector', function($
}
if (!allTplPromise) {
allTplPromise = $http.get('templates/all-templates.html?${timestamp}').then(
var lang = $('html').attr('lang');
allTplPromise = $http.get('templates/all-templates.' + lang + '.html?${timestamp}').then(
function(response) {
$injector.get('$compile')(response.data);
return response;