Added defaultLanguage parameter to middleware