mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 15:46:37 +08:00
feat(frontend): add next-intl bilingual i18n for core paths
Wire next-intl without locale routes, add zh-CN/en catalogs, language switcher, and migrate layout/auth/settings UI copy. Document i18n rules in AGENTS.md and keep static export builds working.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import type { AbstractIntlMessages } from 'next-intl';
|
||||
import type { ReactNode } from 'react';
|
||||
import type { AppLocale } from '@/i18n/config';
|
||||
|
||||
type Props = {
|
||||
locale: AppLocale;
|
||||
messages: AbstractIntlMessages;
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export function AppIntlProvider({ locale, messages, children }: Props) {
|
||||
return (
|
||||
<NextIntlClientProvider
|
||||
locale={locale}
|
||||
messages={messages}
|
||||
timeZone='Asia/Shanghai'
|
||||
>
|
||||
{children}
|
||||
</NextIntlClientProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user