i18n
- Type:
boolean | ((params: CallbackParams) => boolean) - Optional: Yes
The i18n property enables automatic internationalization for a list item's display titles (both parent and child pane titles) using translation resource bundles registered with Sanity Studio's i18n framework.
When enabled, translation keys are resolved dynamically from translation namespaces. You can also specify different translation keys for the parent and child titles.
Standard Usage
Register translation resource bundles in your plugin setup, then configure list items to use translations:
ts
{
title: 'authors',
schemaType: 'author',
i18n: true,
}ts
helpers.listing('author', {
title: 'authors',
i18n: true,
});Parent & Child Titles
You can translate parent and child titles separately by passing translation keys inside a title object:
ts
{
schemaType: 'author',
title: {
parent: 'parent_title',
child: 'child_title',
},
i18n: true,
}ts
helpers.listing('author', {
title: {
parent: 'parent_title',
child: 'child_title',
},
i18n: true,
});