Text Translation for Realm Application

I’m developing a React Native application using Realm where users will be asked to fill out a form with different comma-separated keywords. These words will then be used to do a full-text-search against entries from other users to find matches. I believe I need to translate the entries before storing in the data in the database.
If Person 1 enters: “Red hat, yellow shirt, green car” (US-EN), and Person 2 enters: “Sombrero rojo, camisa amarilla, carro verde” (US-ES), the results should come back as matching.

How would I go about accomplishing this? Do I add a function to my backend Realm app to handle translation? If so, can someone provide resources/suggestions on such a process as well as translation APIs to use? (Preferably open-source)

Thank you! :grinning_face_with_smiling_eyes: