mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-04 22:27:10 -04:00
Non working hmr
This commit is contained in:
parent
70092c1cb7
commit
d522de17e6
20 changed files with 2621 additions and 1185 deletions
18
src/static/js/l10n.ts
Normal file
18
src/static/js/l10n.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import html10n from '../js/vendors/html10n';
|
||||
|
||||
|
||||
((document) => {
|
||||
// Set language for l10n
|
||||
let regexpLang: string | undefined;
|
||||
let language = document.cookie.match(/language=((\w{2,3})(-\w+)?)/);
|
||||
if (language) regexpLang = language[1];
|
||||
|
||||
html10n.mt.bind('indexed', () => {
|
||||
html10n.localize([regexpLang, navigator.language, 'en']);
|
||||
});
|
||||
|
||||
html10n.mt.bind('localized', () => {
|
||||
document.documentElement.lang = html10n.getLanguage()!;
|
||||
document.documentElement.dir = html10n.getDirection()!;
|
||||
});
|
||||
})(document);
|
Loading…
Add table
Add a link
Reference in a new issue