first commit

This commit is contained in:
Jelaletdin12
2026-02-01 20:55:57 +05:00
commit b8c871750a
128 changed files with 23114 additions and 0 deletions

29
lib/i18n-utils.ts Normal file
View File

@@ -0,0 +1,29 @@
"use client"
import { useLocale } from "next-intl"
export function useLocaleInfo() {
const locale = useLocale()
return {
locale,
isRussian: locale === "ru",
isTurkmen: locale === "tm",
}
}
export function getLocaleFlag(locale: string) {
const flags: Record<string, string> = {
ru: "🇷🇺",
tm: "🇹🇲",
}
return flags[locale] || "🌐"
}
export function getLocaleName(locale: string) {
const names: Record<string, string> = {
ru: "Русский",
tm: "Türkmençe",
}
return names[locale] || locale.toUpperCase()
}