I am wondering if there is a lexicon type out there intended for folks to use in their own lexicons for i18n. Bluesky has their langs field. Others could emulate it, but there’s not much momentum or incentive to do so. If there were a well made internationalization type that I could use in my lexicons, it would be a lot easier for me to adopt that and for i18n behavior to be more consistent across lexicons.
For example, in this lex I have a langs field modeled after Bluesky’s approach.
{
"lexicon": 1,
"id": "community.lexicon.rating.prompt",
"description": "A prompt or question that a rating answers, clarifying what aspect of a subject is being evaluated.",
"defs": {
"main": {
"type": "record",
"key": "tid",
"record": {
"type": "object",
"required": ["text"],
"properties": {
"text": { "type": "string", "maxLength": 1024, "description": "The prompt or question text." },
"langs": {
"type": "array",
"items": { "type": "string", "format": "language" },
"maxItems": 3,
"description": "BCP-47 tag(s) the prompt text is written in."
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}
But instead what if it just borrowed an existing type for language tagging.
{
"lexicon": 1,
"id": "community.lexicon.rating.prompt",
"description": "A prompt or question that a rating answers, clarifying what aspect of a subject is being evaluated.",
"defs": {
"main": {
"type": "record",
"key": "tid",
"record": {
"type": "object",
"required": ["text"],
"properties": {
"text": { "type": "string", "maxLength": 1024, "description": "The prompt or question text." },
"langs": {
"type": "ref", "ref": "some.i18n.thing",
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
}
}
}
Thoughts? If I missed an existing topic on this my apologies.