看似默认的区域设置显示在JSON中

问题描述 投票:0回答:1

在下面的视频中,解释了如果只有1个语言环境可用,字段将自动使用默认语言环境:https://www.contentful.com/developers/bits-and-bytes/#localized-content-in-your-contentful-application

我正在使用contentful-management.js API。

然而,当我运行space.getEntries({ "sys.id": id })时,我得到了{title: {en-US: "Some text"}}作为回报。我的预期结果将是{title: "Some text"}

即使我发送space.getEntries({ "sys.id": id, locale: "en-US" }),我也得到相同的结果。

getEntriesgetEntry都会发生这种情况。

“内容模型”甚至尚未启用“启用此字段的本地化”。

contentful.js中的行为是否与contentful-management.js不同或者是否有我错过的内容?

javascript locale contentful
1个回答
0
投票

我找到了答案,contentful-management.js不会自动处理本地化,因此不同于contentful.js

© www.soinside.com 2019 - 2024. All rights reserved.