0

I'm in the process of developing my first translatable Angular 8 app using the new i18n module.

I have already added translation keys everywhere in my application's templates using either the i18n or i18n-placeholder attributes.

However, when I try to run the "ng xi18n" command, I just get the error

ERROR in Cannot assign to a reference or variable!

with not other debug output. I have tried adding arguments such as --verbose, -verbose or -v already, but these don't seem to work on ng xi18n.

I am using Angular 8.2.5 and Angular CLI 8.3.3 on macOS High Sierra and my application builds just fine using both ng serve and ng build

Has anyone experienced this issue before and can help or can at least provide a way to debug this?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Tobias Timpe
  • 720
  • 2
  • 13
  • 27
  • Please share the code you used. The error could indicate of colliding component variable and template variable. – Jessica Rodriguez Oct 08 '19 at 08:35
  • The only things I've used so far are definitions like `i18n="@@element-inner-html"` and `i18n-placeholder="@@placeholder-for-field"` while still specifying both either the normal placeholder value and untranslated content. – Tobias Timpe Oct 08 '19 at 08:40
  • Have you checked this [SO post](https://stackoverflow.com/questions/16038458/html-tags-in-i18next-translation)? – Jessica Rodriguez Oct 08 '19 at 08:57
  • Ok, so now I know that that is the framework that powers the Angular translations, however, all I need right now is a way to debug the ng xi18n command, which there doesn't seem to be. – Tobias Timpe Oct 08 '19 at 10:36

0 Answers0