How Mastodon admins can set their server website’s default language

By default, Mastodon server websites automatically display themselves in the language of the browser viewing the site. For example, if someone has set their browser language to French they would automatically see most Mastodon server websites in French, even if they haven’t logged in and even if the server’s own default language isn’t French.

This automated behaviour is fine if a server is open to speakers of all languages, but it may cause problems on servers that are intended for a specific language. People may accidentally sign up on a server where no one speaks their language.

In order to solve this problem, admins can optionally set their server website to always display in a particular language for everyone.

I am a non-techy person running my server on managed hosting. How do I set my server to display in a particular language?

Contact your managed hosting provider and explain you want to make your server website appear in a specific language for everyone who isn’t logged in.

If they need more info, the official documentation for this option is here ⧉.

If they ask you which language code you want to set, you can see a complete list of Mastodon language codes here.

I am a techy person running my own server manually. How do I set my server to display in a particular language?

You need to set your DEFAULT_LOCALE to your preferred language code, and also set FORCE_DEFAULT_LOCALE=true

The documentation for this is here ⧉.

Will this affect the language displayed for server members who have logged in?

No. It will only affect your server website’s language for people who haven’t logged in. If they are logged in, it will use whatever interface language they want to set it to.

When did this website language behaviour begin? I’m sure it never did this before?

The current website default language behaviour began on Mastodon v4.4.0. Before this, the website visitor’s browser language was ignored.

↩ Back to the front page