I am a serial language student. I can hold a conversation in French and Spanish, and even ASL (American Sign Language) if the other person is patient with me. Accordingly, I have bilingual characters. Nico speaks Spanish. Devin and his whole family speak French. Leighton speaks Italian. And when writing, I try to sprinkle some of that in. Always done by me.
My mom, for those who don't know, is a Spanish teacher. She tells stories about the days when entering "How tall are you?" into a translator would result in "Cómo alto eres?", which is what's called a transliteration or word-by-word translation. It makes no sense to a Spanish speaker.
Presently, Google tells you the correct translation ("Cuánto mides?"). But if you translate "Pleased to meet you" into French, it gives you "Heureux de vous rencontrer," which among other things is the wrong kind of "meet" ("rencontrer" refers to a meeting, not meeting someone; that's "faire la connaissance").
It's little things like this that mean translators will never go out of business. Even though Google's translation into Spanish is technically right ("Encantado de conocerte") you're unlikely to ever see it. Google can't tell you that the easiest and most common way to say "Pleased to meet you" is "Mucho gusto," because the way it's giving you is technically right. It also can't tell you that you don't need "de conocerte"; "encantado" by itself means the same thing. And it won't tell you that if you're female you need to say "encantada" or if you're talking to a CEO you'd say "conocerle".
When friends write bilingual characters, I do the translation for them. And even if you're only doing a few sentences, you should get an actual speaker to do them for you. Patricia Briggs talked about how several books into the Mercy Thompson series, a nice German man wrote her to say that her (self-translated) German was kind of, well, bad. It's embarrassing and it's so easily avoided if you can find a friendly speaker who will translate a few words of dialogue for you.
Of course, if you're translating a whole book, then you definitely want a translator; but they're not as likely to do it for free, and if they offer you should be suspicious.