008f73fec2
wherever I was this is such a heap of shit but it technically works? progress working? but bad on desktop use browser default for date time fix language setting loading fixes
35 lines
831 B
HTML
35 lines
831 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>LBRY</title>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="app"></div>
|
|
<script>
|
|
window.i18n_messages = {};
|
|
|
|
function loadUi () {
|
|
const script = document.createElement('script');
|
|
script.setAttribute('src', 'ui.js');
|
|
document.body.appendChild(script);
|
|
}
|
|
|
|
let lang;
|
|
try {
|
|
lang = window.localStorage.getItem('language') || 'en';
|
|
} catch {
|
|
lang = 'en';
|
|
}
|
|
if (lang && lang != 'en') {
|
|
fetch('https://lbry.com/i18n/get/lbry-desktop/app-strings/' + lang + '.json')
|
|
.then(r => r.json())
|
|
.then(j => { window.i18n_messages[lang] = j; loadUi(); })
|
|
.catch(loadUi);
|
|
} else {
|
|
loadUi();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|