Skip to content

Commit

Permalink
implement new sasjs.js from sasjs/adapter#836; remove workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
gh4nh committed Jun 21, 2024
1 parent 8e3f73d commit 0677bb5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
25 changes: 0 additions & 25 deletions web/custom-sasjs-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,28 +592,3 @@ function showTab(evt, tabName) {
function resizeIframe(obj) {
obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
}

function getUserPreferredLanguage() {
// Modern browsers support navigator.language
if (navigator.language) {
return navigator.language.substring(0,2);
}
// For IE and older versions of Microsoft Edge, use navigator.userLanguage
if (navigator.userLanguage) {
return navigator.userLanguage.substring(0,2);
}

// If none of the above is available, use a default language code
return 'en';
}

// try it out
//console.log(getUserPreferredLanguage());

function loginWindowPhraseConst() {
var loginWindowPhrase = [];
loginWindowPhrase['de'] = "Sie sind jetzt angemeldet.";
loginWindowPhrase['en'] = "You have signed in.";

return loginWindowPhrase[getUserPreferredLanguage()];
}
8 changes: 7 additions & 1 deletion web/sasjs.js

Large diffs are not rendered by default.

0 comments on commit 0677bb5

Please sign in to comment.