Fix internationalization middleware to match 3.0