Reputation: 21
Is there a possibility disable SAP Spartacus I18next module in order to use my own translation module/strategy? I'm trying to use my own shared module with translations but it is based on i18next library same as inspartacus/core, it seems like they are conflicting, because separately they work good.
Upvotes: 2
Views: 1082
Reputation: 581
It is possible but it would require a lot of work. I18nModule
is a core part of the project and is imported in the StorefrontFoundationModule
that is used in the in the StoreFrontModule
and so on.
Therefore, to remove it would require to import all of the modules imported in the StorefrontFoundationModule
, StoreFrontModule
and B2cStorefrontModule
. Directly to your AppModule
. This is doable but the app is likely not to work.
Many components and services depend on translations so you would need to make sure your custom translation is provided in a way that it satisfies those dependencies.
Basically I am saying you are better of trying to extend or override the Spartacus translation functionalities to fit your use case. This module is configurable, extendable and powerful. Feel free too take a look at our documentation on the subject https://sap.github.io/cloud-commerce-spartacus-storefront-docs/i18n/#page-title.
Upvotes: 0