diff options
Diffstat (limited to 'sanity/schemas/localized-string.ts')
| -rw-r--r-- | sanity/schemas/localized-string.ts | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sanity/schemas/localized-string.ts b/sanity/schemas/localized-string.ts new file mode 100644 index 0000000..6ff7424 --- /dev/null +++ b/sanity/schemas/localized-string.ts @@ -0,0 +1,20 @@ +import { supportedLanguages } from "./_locales"; + +export default { + title: 'Localized string', + name: 'localizedString', + type: 'object', + fieldsets: [ + { + title: 'Translations', + name: 'translations', + options: { collapsible: true } + } + ], + fields: supportedLanguages.map(lang => ({ + title: lang.title, + name: lang.id, + type: 'string', + fieldset: lang.isDefault ? null : 'translations' + })) +} |
