i18nexus 문서
i18nexus 라이브러리
쿠키 기반 언어 관리 및 SSR 지원을 갖춘 완전한 React i18n 툴킷
설치
npm install i18nexus핵심 기능
빠른 시작
// app/ClientProvider.tsx
"use client";
import { I18nProvider } from "i18nexus";
import { loadNamespace } from "@/locales";
export function ClientProvider({ children, language }) {
return (
<I18nProvider
initialLanguage={language}
loadNamespace={loadNamespace}
fallbackNamespace="common"
preloadNamespaces={["common"]}
>
{children}
</I18nProvider>
);
}"use client";
import { useTranslation } from "i18nexus";
export default function MyComponent() {
const { t, isReady } = useTranslation("docs-i18nexus");
if (!isReady) return null;
return <h1>{t("Welcome")}</h1>;
}