Closed djanesch closed 1 year ago
Hi @djanesch ,
component & template seem correct.
In the samples you provided I can't see:
export function initL10n(l10nLoader: L10nLoader): () => Promise<void> {
return () => l10nLoader.init();
}
are you sure you are initializing the library?
Compare the doc for v12:
You could also try to add:
ngOnInit() {
this.translation.onChange().subscribe({
next: (locale: L10nLocale) => {
console.log(locale);
console.log(this.translation.data);
}
});
this.translation.onError().subscribe({
next: (error: any) => {
if (error) console.log(error);
}
});
}
and check in console if translation data are loaded without errors.
Let me know.
Closed due to inactivity
I'm submitting a...
Expected behavior Translation of text Actual behavior Usage of the Keynames Steps to reproduce the behavior I have upgraded an running project from angular v7.2.2 and angular-l10n v7.0.2 to angular v12.2.12 and angular-l10n v12.0.1. After clearing all compiling blockers I can successfully run the application but the translations are not displayed just the keynames.
Previous app.module.ts:
Current app.module.ts (minimal and with Inline-Text just for test purposes):
The Login Component:
And the Login-Template:
I can't seem to find the mistake i made. I looked through this all day long and there's not even error messages coming in the debug windows.
I also tried Firefox and Chrome. With deleting the cache...