How to create a language translator from scratch?
Google translate itself uses Deep learning to translate sentences which can be seen here.

You can translate sentences across languages for which you need two things :


A large dataset which has pairs of translations ( like English-French ). You can find such a dataset from here.
A sequence-to-sequence RNN model. They have Encoder-Decoder architecture which encodes the source sentence into a thought vector and then decode it to form the translation. This image may be helpful.

The picture shows the Neural Machine Translation adopted by Google.


Also, TensorFlow and Keras help in creating such deep learning models. You can refer to this blog from the author of Keras. These models ( seq2seq ) have gained popularity in text summarization, NMT, and other sequence-to-sequence tasks.

If you wish to create a full-scale production ready language translator then you will need a GPU as these models are heavy to train as well as a very large corpus of text.