Adds translations to JavaScript.