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

issue while translating "default" #1388

Open
SaravananManickam220592 opened this issue Sep 23, 2022 · 0 comments
Open

issue while translating "default" #1388

SaravananManickam220592 opened this issue Sep 23, 2022 · 0 comments

Comments

@SaravananManickam220592
Copy link

SaravananManickam220592 commented Sep 23, 2022

when i try to translate the word "default" using pipe this is what happens , I have also given the code snippet used below:

Current behavior :

I used a custom loader as below :

export class LazyTranslateLoader implements TranslateLoader {
getTranslation(lang: string): Observable {
return from(import(../assets/i18n/${lang}.json));
}
}

and I load it in the translate module root as below :

TranslateModule.forRoot(
{
loader : {
provide: TranslateLoader,
useClass: LazyTranslateLoader,
}
}
)

when i try to use the pipe and translate the word "default". it is returning me the whole json file instead of just the word

{{ "default" | translate }}

it is rendered as [object object] which is the whole json file.

Expected Behaviour :

it should return just default

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

1 participant