🎨 Internationalization supports Japanese https://github.com/siyuan-note/siyuan/pull/11212

This commit is contained in:
Daniel 2024-05-01 16:10:07 +08:00
parent 71d00fc8f8
commit 6e0da992af
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
7 changed files with 18 additions and 6 deletions

View file

@ -9,3 +9,12 @@ export const genOptions = (data: string[] | { label: string, name: string }[], k
});
return html;
};
export const genLangOptions = (data: { label: string, name: string }[], key: string) => {
let html = "";
data.forEach((item: { label: string, name: string }) => {
html += `<option value="${item.name}" ${key === item.name ? "selected" : ""}>${item.label} (${item.name})</option>`;
});
return html;
};