You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i have a monorepo with a few buildable libs already and splitted everything accordingly, since Transloco supportes scoping for feature libs this was the goto when evaluating other Translations Libraries for usability.
I mean it works just fine by using the '...' | transloco in the feature module itself, the scope is correct and so on, no problems at all.
But when i try to translate my ui modules which have following pattern to make them as modular as possible:
I just don't get any translation from the translocoService.selectTranslate in useFactory Provider unless i call 'auth.forms...' | translate (for example) in the Template, which is honestly really strange. My TranslocoRootModule is imported at Shell Level and just provides the config and nothing more. I get the Config which i provided at the useFactory and it isn't malformed or so, but when i try to log the entire Translations, to see if any were loaded, then there are none whatsoever.
@NgModule({exports: [TranslocoModule],providers: [{provide: TRANSLOCO_CONFIG,useValue: translocoConfig({availableLangs: environment.availableLanguages,defaultLang: environment.defaultLanguage,// Remove this option if your application doesn't support changing language in runtime.reRenderOnLangChange: true,prodMode: environment.production,})}]})exportclassTranslocoRootModule{}
I hope someone had this problem and/or could help me, maybe i just forget something that is needed to load them while in use with useFactory(...).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So i have a monorepo with a few buildable libs already and splitted everything accordingly, since Transloco supportes scoping for feature libs this was the goto when evaluating other Translations Libraries for usability.
I mean it works just fine by using the
'...' | transloco
in the feature module itself, the scope is correct and so on, no problems at all.But when i try to translate my ui modules which have following pattern to make them as modular as possible:
I just don't get any translation from the
translocoService.selectTranslate
inuseFactory
Provider unless i call'auth.forms...' | translate
(for example) in the Template, which is honestly really strange. My TranslocoRootModule is imported at Shell Level and just provides the config and nothing more. I get the Config which i provided at theuseFactory
and it isn't malformed or so, but when i try to log the entire Translations, to see if any were loaded, then there are none whatsoever.I hope someone had this problem and/or could help me, maybe i just forget something that is needed to load them while in use with
useFactory(...)
.Beta Was this translation helpful? Give feedback.
All reactions