middleware: support i18n