Allow jsVar config and output locale/lang in js

This allows the config of the jsVar and also outputs the lang and locale directly onto the defined object.