And I’d like to be able to list the ‘lang’ with the translation, but since the calls are asynchronous I’m always getting the last language in the list. If you have a sec I could use some help. Thanks!
To use await, you need to first convert the function to a promise-style function. Usually, this is as easy as doing require("util").promisify(translator). Unfortunately, this particular library did not use the standard callback-style for functions, so we had to do it manually on line 3. Let me know if you need any more help or explanation.