Closed linconsdev closed 1 year ago
Before 10, you can use I18nRequestScopeService
. But as of version 10 and above, I18nRequestScopeService
is removed . This because we now have async_hooks support. This allows you to get the current I18nContext by doing I18nContext.current(). That being said, you can follow here for translation for services https://github.com/toonvanstrijp/nestjs-i18n/blob/main/samples/simple/src/app.service.ts. Feel free to open if the issue persists
How can we use translations inside NestJS services without I18nRequestScopeService? Can someone please share a simple example with me? I've tried with I18nService but it always translates to fallback language and I18nContext throws an error that dependency can not be resolved.