Add local function to return translations

This function can be used on ejs pages to load all translations for a page as a json object.