Added support for the 'locale' parameter.