Does transloco supports multiple scope definitions? #596
Unanswered
kumart-netapp
asked this question in
Q&A
Replies: 1 comment
-
Yes, we use this feature. In our angular module we declare scopes like this at the provider level : import { TRANSLOCO_SCOPE } from '@ngneat/transloco';
...
providers: [
...
{ provide: TRANSLOCO_SCOPE, useValue: ['scope1', 'scope2', 'scope3'] },
...
], Then we use scopes like this : <ng-container *transloco="let t">
<div>{{ t('scope1.something') }}</div>
<div>{{ t('scope2.something') }}</div>
</ng-container> Note 1 : by default, trandloco will prefix translation keys by their scope. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does transloco supports multiple scope definitions?
Beta Was this translation helpful? Give feedback.
All reactions