added an option to supply your own lang and formats