As @polesye pointed out, gettext function is used for internationalization in JavaScript.