# gt-next: General Translation Next.js SDK: 独立 i18n URL: https://generaltranslation.com/zh/docs/next/concepts/stand-alone.mdx --- title: 独立 i18n description: 如何将 gt-react 用作独立的 i18n 库 --- {/* 自动生成:请勿直接编辑。请在 content/docs-templates/ 中编辑模板。 */} ## 概述 `gt-next` 在功能上与许多其他 i18n 库相当。 这意味着你可以将 `gt-next` 作为独立 i18n 库使用,而无需使用 General Translation 平台。 为此,请不要提供任何环境变量,例如 `GT_API_KEY` 或 `GT_PROJECT_ID`。 如需了解如何从其他 i18n 库迁移到 `gt-next`,请参阅我们的[迁移指南](/docs/next/guides/migration)。 ## 取舍 将 `gt-next` 用作独立的 i18n 库时,需要做一些取舍。 ### 手动翻译 你需要手动翻译应用。如果你使用我们的平台,我们会自动为你翻译应用。 如果你的项目只使用 [dictionaries](/docs/next/guides/dictionaries) 和 `useTranslations` 函数, 那么你需要像使用其他 i18n 库一样,手动翻译这些字典。 请确保使用 [`loadDictionary`](/docs/next/api/config/load-dictionary) 函数加载翻译后的字典。 *** ### 手动翻译字符串 如果你的项目使用 [``](/docs/next/guides/t) 组件 或 [`useGT`](/docs/next/guides/strings) 函数进行内联翻译, 你还需要手动翻译这些字符串。 由于内联翻译没有 key,CLI 工具提供了一个命令:[`gt generate`](/docs/cli/generate) 它会自动为你的项目生成模板文件。你只需为每种语言编辑模板文件并填入相应的翻译即可。 请确保使用 [`loadTranslations`](/docs/next/api/config/load-translations) 函数加载已翻译的字符串。 ### 开发阶段无翻译