Background
IPInfo currently displays MaxMind data in English only. We did an investigation into how to make translations available: T266273. Providing full coverage will be complicated (see the linked task for more detail).
To start with, we can use the translations that MaxMind provides for location data. It does not have full coverage in terms of which locations have translations, or which languages they are translated into. (See an example in: T266273#8184182.) But it would be an improvement and is relatively straightforward to implement.
What needs to be done
geoip2's Reader class accepts an array of locales in its constructor - documented here. Currently IPInfo does not pass anything in, so ['en'] is used by default.
IPInfo's ReaderFactory::get method could be updated to accept an array of locales, which it passes on to Reader.
We should pass the entire fallback chain, which can be obtained from LanguageFallback::getAll, along with the user's preferred language code.
Acceptance criteria
- Where MaxMind has a more appropriate translation than English, use that for country and location data
- Where MaxMind does not have a more appropriate translation than English, use English (i.e. no change from the current behaviour)