Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying translation namespace on the component level #1196

Open
appimpact opened this issue Apr 8, 2020 · 1 comment
Open

Specifying translation namespace on the component level #1196

appimpact opened this issue Apr 8, 2020 · 1 comment

Comments

@appimpact
Copy link

Hello,

We are currently using ngx-translate the way we specify namespace together with the translation key for each line:

<p>{{'Admin_Member_EditForm.FirstName' | translate}}</p>
<p [translate]="'Admin_Member_EditForm.LastName'"></p>

Back in the past when we were working with AngularJS, angular-translate plugin would allow us to do to this:

<div [translate-namespace]="'Admin_Member_EditForm'">
  <p>{{'FirstName' | translate}}</p>
  <p [translate]="'LastName'"></p>
</div>

Above is the pseudo-code how it might look with ngx-translate.

The goal is to eliminate specifying namespace in every directive/pipe, but instead to specify it once on the component level (actually on the parent HTML element).

Is this supported by ngx-translate?
If not, are there any plans for this / any workarounds that we could do to make this happen?

@ReschAndr
Copy link

ReschAndr commented Jan 29, 2021

#1284 not exactly implemented as you suggested but basically this pr should provide you the feature you wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants