They used to have a handbook called Good News for All Nations with a potted introduction in multiple languages which could be shown to the householder (if you could find out from them what language they speak) and which enabled the publisher to go back with literature in their language and pass on their details to an appropriate language congregation. If permission was given (or often, even if it wasn't - in the UK and EU this was the days before GDPR) the details were then written on a yellow slip and given to the relevant language congregation.
Today there are two other options, both of which require a mobile device: Download/playback a relevant video in their language from the JW Library app or the JW website, or if you really want to make the effort, use the fairly new JW Language app to find out some sentences in that language to make basic conversation. It is a kind of Babelfish tool, which enables the publisher to have some handy preaching phrases.
Of course, you can also just have a few basic items like tracts with you in other languages, if you know what the main ones are. In the UK, apart from the main European languages, it's mainly going to be Polish, Romanian, Albanian, Arabic and some South Asian languages like Urdu, or Punjabi. Then just hand someone one of those to read and direct them to the JW website to find their own language for themselves. That's the lazier option.