The above. I don't suggest writing something like this from the ground up unless you're willing to spend several months or even years doing development on it. Also, realize there is a margin of error in all language models so don't expect 100% accuracy in your translations.