GitHub:使用Localize GitHub 集成实现文件翻译自动化

轻松将Localize面板连接到您的 GitHub 存储库,以自动执行和简化 GitHub 和Localize项目之间的内容工作流程。

使用LocalizeGitHub 项目Localize

自动Localize您托管在 GitHub 上的文档、维基和静态网站。Localize 可帮助您的开发者社区和客户以任何语言理解您的项目,无需额外配置或手动更新。
自动检测待翻译的新内容
您可以利用机器翻译、您自己的译员或我们的语言服务提供商 (LSP)。
支持多种语言对

Localize vs react-i18next and react-intl

React-i18next and react-intl are popular open-source libraries for internationalizing React apps.
They give developers precise control, but every string needs to be wrapped in code,
every language needs its own resource file, and translation updates usually mean a new build.

Localize handles translation at runtime, so your team doesn't have to manage string extraction or translation files.
React-i18next / react-intl
Localize
设置
Install the library; wrap strings in t() 或者<FormattedMessage>, configure locales
Paste one JavaScript snippet
Translation files
JSON or message files per language, kept in your repo
None. Content is managed in the dashboard
New or changed strings
Extract, send to translators, merge, redeploy
Detected automatically as they render
Dynamic content
(Dynamic generation source)
Not handled natively and must be translated as content is detected
Detected when it renders
Who manages translations
Mostly developers
Anyone on the team, in a no-code dashboard
Translation sources
Depends on how you translate your content
AI translation, human translators or language service providers
Deploying Changes
Done via your CI/CD
Automatic from our snippet

Which should you choose?

Choose a library if you want every string defined in code and have engineering time for ongoing i18n maintenance.
Choose Localize if you want to launch new languages in days and let non-developers manage translations.

Get up and running with the React integration guide, the developer docs and live customer support.
设置

Add Localize to your react app in 3 steps

How the React Integration Works

步骤 1

Paste our 片段 into the <head> of your index.html or layout file.

Replace YOUR_PROJECT_KEY with the key from your Localize dashboard. See the full list of options in our Library API docs.

步骤 2

Let users switch languages from your own React component.

Localize ships a built-in language widget. If you want the switcher to match your design system, call Localize.setLanguage from any component.

步骤 3

Load your app and approve phrases. Open your app, choose a target language, and browse your pages.

Localize picks up new content as it renders and sends it to your dashboard. You approve the phrases there, and they go live in your app without a redeploy.
问答

常见问题解答

Localize GitHub 集成安全吗?

是的。该集成由 GitHub 应用提供支持,可安全地控制个人信息和帐户访问权限。

该集成是否有权访问我的 GitHub 凭据?

Localize GitHub 集成会存储一个由 GitHub 生成的身份验证令牌,该令牌允许Localize访问您指定的代码仓库。我们无法访问您的个人凭据。

Localize如何检测源短语的变化?

每次在配置的分支中提交对源文件的更改时,GitHub 都会通知Localize。然后, Localize会重新导入此更新后的文件,并根据需要创建或更新短语。

我的翻译何时提交到我的 GitHub 代码库?

由于每个人的工作流程各不相同,我们提供了多种交付方式供您选择。您可以随时点击“立即交付”Localize,将最新的翻译发送到您 GitHub 帐户中的代码库。Localize 还可以按照您设置的计划检查更新,并在检测到新翻译时自动上传。

我的翻译将如何显示在我的 GitHub 代码库中?

当Localize发布新的翻译时,它会针对您配置分支上的最新提交创建一个拉取请求。此提交将包含项目中每种已配置语言的翻译文件。这样,您可以根据自己的时间安排进行审批和合并。

我可以查看Localize下载我的源短语的历史记录吗?

是的。您可以在文件导入/导出页面查看运行历史记录。如果Localize因任何原因无法处理您的源文件,系统将显示详细的错误信息,以帮助您进行故障排除。

加入超过 40,000 名信赖Localize进行翻译的用户行列

准备好更快地翻译您的网站和内容了吗?

立即联系专家,了解如何在几分钟内(而不是几个月)完成网站翻译。
DeutschEnglishEspañolFrançais日本語Português (Brasil)
Powered by Localize
反馈提交反馈
中文(简体)