draft
optional
author:alexgleason
A lang
tag may be added to text events to indicate the language of the text. The value of the tag MUST be a valid ISO 639-1 language code.
For example:
["lang", "en"]
The language tag is a hint for automatic translations, as well as a tool for filtering by language. It is not a guarantee that the text is in the specified language. Some messages could contain text in multiple languages, text in a different language, or text in no language at all.
Clients may append a lang
tag based on the user's selection at the time of the post, or based on a user setting. If the user has not selected a language, the client should omit the lang
tag.
Relays implementing this NIP should validate that the lang
tag is a valid ISO 639-1 language code, and if so index the event so it can be requested with tag filters:
["REQ", <subscription_id>, {"#lang": ["en"]}]