Our I18n translater is currently a server-side singleton.
So, a race condition could result in a user getting SSRed content in the locale of a different active user.
We re-initialize i18n on every page load. So, the correct locale is usually used.
But a second parallel request could set the locale to something else that is then used for both responses.
In other words, we need to put a translater into the context that explicitly uses the user's correct locale.
The library lets you pick a locale per translation we just haven't used that feature.
Here's the game plan:🏏
Our I18n translater is currently a server-side singleton.
So, a race condition could result in a user getting SSRed content in the locale of a different active user.
We re-initialize i18n on every page load. So, the correct locale is usually used.
But a second parallel request could set the locale to something else that is then used for both responses.
In other words, we need to put a translater into the context that explicitly uses the user's correct locale.
The library lets you pick a locale per translation we just haven't used that feature.
Here's the game plan:🏏