Skip to main content
  1. Blog/

Mastodon Languages

social language Mastodon Apple iOS
Phil Chu
Phil Chu
Making software since the 80s

Mastodon posts have a language property indicating what language is in. This is potentially useful for automatic translation and to allow followers to filter which languages they want to see in posts (this is also in the Mastodon API as part of the follow request).

So I put in a language menu.

The API spec says the language property is a two-character language identifier from ISO 639.1. So that’s what I started with, but after looking at the Mastodon source (and the Mastodon web interface), I realize now it’s actually ISO 639.1 minus Gaurani (gn) and Samoan (sm), and plus several three-letter codes from ISO 639.3, although some of those codes are so recent they’re not in Apple’s ISO list (too bad, because otherwise they provide localization of the display names).

And too bad, Mastodon’t list doesn’t include Klingon.