Add support translations into JavaScript

Hello!
Please add very simple support for translations in javascript file.
Thx