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

Dynamically construct translation keys #850

Open
taiducnguyen opened this issue May 16, 2018 · 2 comments
Open

Dynamically construct translation keys #850

taiducnguyen opened this issue May 16, 2018 · 2 comments

Comments

@taiducnguyen
Copy link

taiducnguyen commented May 16, 2018

Hi all,

How can I fallback to a default key if the dynamic translation key is not found?

This is in my case:
[innerHTML]="'Commons.HttpStatus.' + statusError || ' Commons.HttpStatus.Default' | translate"

Could you please help me invest this?

Thanks!!

@taiducnguyen
Copy link
Author

Hi,

I found a solution here to handle error: #160

Do you have any better solution for this one?

Thanks

@nicholasgcoles
Copy link

Hi @taiducnguyen did you manage to solve this without using a function?

It would be great if one could parse in default text as an argument to the translate pipe

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