#631 web component i18n implement new approach

This commit is contained in:
agriyadev5
2021-08-30 19:16:08 +05:30
parent 8e158eea64
commit 7fc2c93693
15 changed files with 141 additions and 95 deletions

View File

@@ -1,4 +1,5 @@
import 'elix/define/DropdownList.js';
import { t } from '../locale.js';
const template = document.createElement('template');
template.innerHTML = `
@@ -59,7 +60,7 @@ export class SeList extends HTMLElement {
if (oldValue === newValue) return;
switch (name) {
case 'label':
this.$label.textContent = newValue;
this.$label.textContent = t(newValue);
break;
case 'height':
this.$dropdown.style.height = newValue;