-
-
Notifications
You must be signed in to change notification settings - Fork 679
Description
🚀 Feature Proposal
Enable strong type checking of translations in monorepos with multiple i18next instances.
Create a template type i18nInstance<CustomTypeOptions>
, which would accept the CustomTypeOptions declaration as a type parameter. This would allow annotating i18next instances from createInstance()
with different resources.
Motivation
Strong type-checking in monorepos currently does not allow packages to have independent translation resources.
The method described here (https://www.i18next.com/overview/typescript) does not allow defining different resources for different packages in the monorepo.
Example
In a monorepo, you could have two packages, each with their own locale resources and their own i18next instance. This would allow cleaner isolation between these two packages and enable strongly type checking the translation keys in each package.