feat: add core i18n runtime and catalogs
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { toIntlLocale } from "./format";
|
||||
|
||||
export function getDocumentLocale(): string {
|
||||
if (typeof document === "undefined") return "tr";
|
||||
return document.documentElement.lang || "tr";
|
||||
}
|
||||
|
||||
export function getDocumentIntlLocale(): string {
|
||||
return toIntlLocale(getDocumentLocale());
|
||||
}
|
||||
Reference in New Issue
Block a user