setWebsiteLocale
Sets the root HTML lang attribute. When no locale is provided, the helper falls back to the current document language, browser language, or en.
Importing
ts
import { setWebsiteLocale } from '@almighty-shogun/utils';Usage
ts
import { setWebsiteLocale } from '@almighty-shogun/utils';
setWebsiteLocale('nl');
// <html lang="nl">Parameters
locale?: Undefinable<string>
Locale to apply. Falls back to document or navigator language, or en.
Uses
Type signature
ts
declare function setWebsiteLocale(locale?: Undefinable<string>): void;