i18next / i18next-http-middleware

i18next-http-middleware is a middleware to be used with Node.js web frameworks like express or Fastify and also for Deno.
MIT License
152 stars 28 forks source link

i18next-http-middleware in Hapi js #48

Closed emanuelet closed 2 years ago

emanuelet commented 2 years ago

🚀 Feature Proposal

Would it be possible an .hapiPlugin function to support HapiJs?

Motivation

The "official" package https://github.com/kenkouot/hapi-i18next is not been maintained anymore. Also I will like more the agnostic middleware approach.

Example

On our backend application we used this code to get it to work:

server.ext('onPreHandler', (request, h) => {
      let resp = request.Response || request.response || h.response()
      i18nextMiddleware(request, resp, () => {
        return true
      })
      return h.continue
    })
adrai commented 2 years ago

Would you like to send a Pull Request to address this? Remember to add tests.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

emanuelet commented 2 years ago

Wokring on the PR

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.