Closed kapyar closed 1 year ago
For those who will face the same problem. You need to define localized type on your own, @sanity/language-filter
only prides filter. So for example if you want to have localized string you need to do following steps:
export default defineType({ name: 'localeString', title: 'Locale String', type: 'object', fields: [ { title: 'English', name: 'en', type: 'string', }, { title: 'Ukrainian', name: 'uk', type: 'string', }, ], })
2. Use this field in where you need it
defineField({ name: 'localeName', title: 'Localized String', type: 'localeString', options: { languageFilter: true, }, }),
What do I do wrong. can turn on localization for field I have the following config