集成

Contentful (Strings)

文本由 Phrase Language AI 从英语机器翻译而得。

重要

此连接器已被弃用。

提示

有关 Phrase TMS 中 Contentful 集成的信息,请参阅 Contentful (TMS)。

该集成允许开发人员、撰稿人、经理和营销人员连接到其个人资料,并直接从 Contentful 内部访问翻译。该集成不适用于多个环境,也不需要在 Contentful 本身中启用本地化。

先决条件

  • 一个 Contentful 账户。

  • 已安装的 application。

  • 要在预览中显示多个键,需要一个使用嵌套翻译语法的环境。i18next 就是此类框架的一个示例。如果框架不包含此功能,则可能需要编写自定义预格式化程序。

设置应用程序

要在 Contentful 中设置应用程序,请按照以下步骤操作:

  1. 点击 Content model 选项卡。

  2. 选择要与应用程序一起使用的内容模型。

  3. 点击 Sidebar 并使用 Add New 图标添加应用程序。

  4. 从内容模型的 Fields 列表中,点击 Settings。

  5. 从 Appearance 磁贴中,选择 Phrase。

  6. 对要与应用程序一起使用的每个字段重复此操作。

  7. 点击保存。

    该应用程序现已在 Contentful 侧边栏中可用,可用于使用 Phrase 凭据登录。

  8. 提供凭据并点击 Connect with Phrase。

  9. 从下拉列表中选择一个 Phrase 项目 和一种语言,然后点击 保存。

    现在可以在 Contentful 中搜索和查看 Phrase 内容。

搜索内容

在 Title 字段中输入 /text 命令以搜索存储在 Phrase 中的文本,输入 /key 命令以搜索键名称。结果会显示在下拉列表中,使用箭头键和回车键选择最为方便。

点击 预览 以查看基于所选键的内容。

在 Contentful 中使用 ICE

In-context Editor (ICE) 也可用于 Contentful 预览,允许通过编辑器切换语言并在上下文中编辑翻译。

必须手动提取并翻译从 Contentful 接收到的字符串或字段中的键。

要设置使用 In-context Editor,请遵循以下步骤:

  1. 确保有一个可接收来自 Contentful 数据的环境,例如用于预览条目的网站在线版本或仍在开发中的应用程序。

  2. 安装并设置 In-context Editor。

  3. 通过在 Contentful 预览设置中放置环境的 URL,将 In-context Editor 配置为 Contentful 预览。

这篇文章有帮助吗?
★ ★ ★ ★ ★

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.