
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're trying to use the internationalized array plugin with block content (Portable Text), and getting an error with internationalizedArrayString. Here's how to properly configure it:
When you configure the internationalized array plugin, the fieldTypes array tells it which field types to generate internationalized versions for. The plugin automatically creates new schema types based on what you pass in.
For your block array (Portable Text), you need to pass a field definition into fieldTypes:
import {defineConfig, defineField} from 'sanity'
import {internationalizedArray} from 'sanity-plugin-internationalized-array'
export default defineConfig({
// ...
plugins: [
internationalizedArray({
languages: [
{id: 'en', title: 'English'},
{id: 'fr', title: 'French'}
],
fieldTypes: [
'string', // This creates internationalizedArrayString
defineField({
name: 'information',
type: 'array',
of: [{type: 'block'}]
})
],
})
]
})This configuration will create two new schema types:
internationalizedArrayInformation (the array wrapper)internationalizedArrayInformationValue (the object containing your block content)Then use it in your document schema like this:
defineField({
name: 'information',
title: 'Information',
type: 'internationalizedArrayInformation',
})Note that the type name is generated from the name field you provided in the fieldTypes configuration.
Type naming: When you pass 'string' in fieldTypes, it creates internationalizedArrayString. When you pass a field definition with name: 'information', it creates internationalizedArrayInformation. The name gets converted to the type name, and the actual field inside becomes value.
Stored data structure: Your data will be stored as an array with language keys:
"information": [
{ "_key": "en", "value": [{type: 'block', ...}] },
{ "_key": "fr", "value": [{type: 'block', ...}] }
]Querying: To query a specific language:
*[_type == "yourType"] {
"information": information[_key == "en"][0].value
}If you're still experiencing issues, make sure you're using the latest version of the plugin (check for updates beyond 1.6.2, as version 1.10.1+ fixed some Portable Text compatibility issues).
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store