Skip to content

How a player gets their language

Pavel Erokhin edited this page Oct 19, 2026 · 1 revision

Every player reads every line in their own language. Steve from Moscow sees the Russian join line, Alex from Berlin the German one, for the same join.

The order

  1. Their own choice. A player who picked a language with /mojoins language ru gets it, until they run /mojoins language auto. The choice stays across restarts.
  2. The sources in locales.sources, tried in order. Out of the box that’s [ ip, client ]:
    • ip: the country of the player’s IP address. locales.countries maps languages to country codes: Russia, Belarus, and Kazakhstan get Russian; Spain and Latin America get Spanish; Brazil and Portugal get Portuguese; Germany, Austria, and Switzerland get German.
    • client: the language set in the player’s game, when a file in lang/ matches it. pt_BR matches pt_br.yml first, then pt.yml.
  3. The default. Everyone else gets locales.default, English out of the box.

A country that isn’t listed falls through to the next source. So a player from France with an English game reads English.

Check what a player got

/mojoins locale Steve answers:

Steve: language ru, country RU, game language en_US

The IP won over the game language. If Steve would rather read English, he runs /mojoins language en.

The country database

The country lookup needs no account and sends no address anywhere. On the first start, Mo’Joins downloads DB-IP’s free “IP to Country Lite” database (4 MB, 8 MB unpacked) into plugins/MoJoins/geoip/. It checks twice a day and downloads a new one once the file is older than geoip.refresh_days (30 days).

Until the database is there, and for local addresses like 127.0.0.1 or 192.168.x.x, the plugin has no country and goes to the next source.

Players who connect through a proxy or a relay show up with its address, so they get the relay’s country. See the FAQ.

To turn the lookup off, set geoip.enabled: false or drop ip from locales.sources. Mo’Joins then downloads nothing.

Next: Adding a language

Clone this wiki locally