Skip to main content

Language preference API

EndpointPurpose
GET /api/meIncludes preferredLanguage: a BCP 47 tag, or null when the user has not chosen one.
PUT /api/me/preferencesSaves the signed-in user's language. Body: language (required), from and surface (optional, for telemetry). Returns 200 with preferredLanguage.

The JSON field is camelCase, like the rest of the API. It is stored in the users.preferred_language column.

Errors​

StatusMeaning
400 unsupported_languagelanguage is not the tag of an enabled locale.
401No valid session.

Enabled locales: en-US, es-US and ar (Arabic, right-to-left). The language_changed event carries the new locale's direction. A user can only change their own language.