-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internationalization (i18n) / multilingualism for some text fields ? #86
Comments
Good flag! We indeed overlooked this when designing the spec. The main things intended to be human-readable are names (e.g., of resources and prompts) and descriptions, so I think we'd want to focus i18n support on those. Would you be interested in drafting a proposal PR? |
I'd love to. However, this would be a somehow ambitious PR, with quite a few design choices to be made beforehand. Do you really think this is a must-have feature? If so, I'll gladly give it some work. I'll follow up with some more targeted questions. |
What would be the most appropriate standard to encode language codes? ISO 693-1? ISO 693-2? IETF BCP 47? Any other? |
Should we provide backward compatibility? If so, any advice on how to achieve this here? |
In terms of workflow, where should language selection occur?
These options would have pretty different impacts on the spec. |
Names are used as identifiers. I fear we might end up having problems by making them multilingual, for prompts names or tools names in particular. Especially if they end up being hardcoded in some clients when calling "well-known" servers, or for inter-servers communication someday, if this ever occurs. On the other hand, descriptions can be translated harmlessly. |
Sorry for the delay in getting back to you here!
Makes sense. We can hold off on the PR while we figure out these key questions, just to avoid unnecessary work that then requires changes.
I don't know if it's must have, but I think it's pretty silly in 2024 to not consider internationalization. Really glad you brought it up! Regarding the specific questions, I'd be curious for your initial opinions. Always happy to discuss and suggest alternatives, if needed, but you've had a lot of good thoughts so far and I want to make sure to hear you first. |
OK, my suggestions will follow. I'll address each topic in a specific "thread" inside this issue, to keep things separated. |
Let's go for the wiiiiiiidely used IETF BCP 47. For instance:
The component that selects the language (either client-side or server-side, see other topic) SHOULD provide a fallback mechanism to a close variant if the preferred language is not available. For instance: If no close variant is available, or if i18n is not handled by the component, the "default" language MUST be returned (text + corresponding language code). |
The more I think about it, the more I feel it would be a hassle to translate names for tools and prompts:
On the other hand, names for resources could be i18n-compliant, since the identifier would be the uri in that case. The spec indeed states they are "human-readable names". That being said, we have another problem, not spec-related: In Claude Desktop, the "Allow" popup says "Run tool_name from server", without description, which is some kind of flaw in itself. And even more if only the description is translated. |
Let's avoid unnecessary network traffic. For requests, clients should add an optional For responses, servers should add a (mandatory?) Language selection would be handled by the server. The server would fall back to its default language if:
|
Not sure yet, but I feel me might figure out a smooth solution. If not, this would probably join other major and impactful changes in a next version of the spec. |
Thanks for all the thoughts! Broadly, this sounds great. I'd suggest the following:
Done this way, it should actually be 100% backwards compatible, since this doesn't involve changes to the shapes of any other responses—and we can add it to any protocol version. What do you think? If this sounds good to you, let's get started on the spec changes. 🙏 |
Hello.
All text fields included in the spec are provided on a single-language basis.
As often, English is the most widely used language, in the spec or examples found elsewhere.
It is usually not a problem when dealing with APIs, since these are seen only by developers or machines.
However, with MCP, I understand some texts (prompts, descriptions...) might be read / selected / typed directly by end users.
Are there any plans to provide an internationalization (i18n) / multilingualism mechanism in the spec?
Or shall we rely on the LLM to handle the (possibly not totally accurate) translations?
Thanks!
The text was updated successfully, but these errors were encountered: