diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js index 4d1f1f97e4e..c0dfc431d92 100644 --- a/ui/scripts/cloudStack.js +++ b/ui/scripts/cloudStack.js @@ -313,7 +313,7 @@ // EULA check $.ajax({ - url: 'eula.html', + url: 'eula.' + $.cookie('lang') + '.html', dataType: 'html', success: function(html) { cloudStack.uiCustom.login($.extend(loginArgs, { eula: html, hasLogo: true })); diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index 800b7bb2961..77130af3b8d 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -89,6 +89,12 @@ $.cookie('lang', $(this).val()); document.location.reload(); }); + + // Set default language + if (!$.cookie('lang')) { + $.cookie('lang', 'en'); + } + $languageSelect.val($.cookie('lang')); }; })(jQuery, cloudStack);