In this release, there are two new things! 😊
-
You can use
i18n.js
for the configuration file, apart fromi18n.json
. Both are supported now. (You should usemodule.exports
on the.js
extension) -
Now in the configuration you have one new property called
logger
to be able to capture the missing keys. This function is executed in both production and development. However, if you do not use this function by default the internal functionlogger
that we have calls aconsole.warn
only in development.
By the way, Next.js is now starting to support i18n. For version 9.5.7 of Next.js there will be the i18n routing part. This is very good news, and we'll probably start doing a little refactoring of what we have here. Things such as Link
and Router
may no longer make sense since exactly the same functionality will be in the Next.js core (replacing lang
to locale
). We'll see, for the moment it's experimental, but I think it's good to announce it.
In the future, when not only the i18n routing will be in Next.js, but also the part of loading the translations, we will most probably be able to remove the "build step".
FEATURES
- Add logger to appWithI18n #281 (by @aralroca)
- Add logger to config #280 (by @aralroca)
- Improve logger feedback messages #279 (by @aralroca)