Open ymcheung opened 3 years ago
Hi! I am using intl-input just for objects and have done the following:
intl-input.json "languages": [ { "name": "en", "title": "English" }, { "name": "tw", "title": "中文" } ]
Document schema export default { title: 'Media', name: 'media', type: 'document', fields: [ ... { title: 'Name', name: 'name', type: 'mediaTranslate' }, ... ] }
export default { title: 'Translate', name: 'mediaTranslate', type: 'object', options: { i18n: true }, fields: [{ title: 'Translate', name: 'translate', type: 'string' }] }
Then do sanity graphql deploy and try queries in playground. However, I got translation as a string and all of them are null.
sanity graphql deploy
translation
null
type MediaTranslate { _key: String _type: String translate: String }
What is the correct way to get i18n data for object level? Thank you!
Hi! I am using intl-input just for objects and have done the following:
Then do
sanity graphql deploy
and try queries in playground. However, I gottranslation
as a string and all of them arenull
.What is the correct way to get i18n data for object level? Thank you!