Next.js 16 App Router, TR/EN i18n via [lang] routing and proxy.ts, Tailwind v4, minimal list menu style, sticky bottom tab bar with Intersection Observer, PWA manifest, WhatsApp fixed button. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
427 B
TypeScript
17 lines
427 B
TypeScript
import 'server-only'
|
|
|
|
const dictionaries = {
|
|
tr: () => import('../../dictionaries/tr.json').then((m) => m.default),
|
|
en: () => import('../../dictionaries/en.json').then((m) => m.default),
|
|
}
|
|
|
|
export type Locale = keyof typeof dictionaries
|
|
|
|
export function hasLocale(locale: string): locale is Locale {
|
|
return locale in dictionaries
|
|
}
|
|
|
|
export async function getDictionary(locale: Locale) {
|
|
return dictionaries[locale]()
|
|
}
|