Repository navigation
How a player gets their language
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.
-
Their own choice. A player who picked a language with
/mojoins language rugets it, until they run/mojoins language auto. The choice stays across restarts. -
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.countriesmaps 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 inlang/matches it.pt_BRmatchespt_br.ymlfirst, thenpt.yml.
-
-
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.
/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 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
Mo’Joins on GitHub · Related projects · IP Geolocation by DB-IP, CC BY 4.0