Docs
Usage guide
Checklist for production

Checklist for production

While the installation instructions are sufficient to use next-intl in your Next.js app, this checklist helps you ensure you're all set for production:

  1. If you're using TypeScript, you can take advantage of autocompletion and type safety for message keys by setting up a type for your messages.
  2. Please check the runtime requirements and optionally provide polyfills.
  3. If you're formatting dates and times, a time zone should be configured. By default, dates are formatted according to the time zone of the environment, which can lead to markup mismatches if the server and the user are located in different time zones. By supplying the timeZone explicitly, you can ensure that dates and times are rendered the same way on the server as well as the client.
  4. If you're formatting relative dates and times, a global value for now can be useful. This ensures that the server and client will render the same markup. Especially if you use caching for the responses of the server, the likelyhood of mismatches increases.
  5. To achieve consistent date, time and number formatting, it might be useful to set up global formats which ensure consistent formatting across the app.