init commit

This commit is contained in:
rxliuli
2025-11-04 05:03:50 +08:00
commit bce557cc2d
1396 changed files with 172991 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import { getLocAttributes } from './getLocAttributes';
/**
* sets Language attributes to HTML tag.
* @param {string} language
* @returns {void}
*/
export function setHTMLAttributes(language: string): void {
if (typeof window === 'undefined') return;
const attributes = getLocAttributes(language);
for (let [attribute, value] of Object.entries(attributes)) {
window.document.documentElement.setAttribute(attribute, value);
}
}