1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Add Angular i18n translations from outside the project

Discussão em 'Angular' iniciado por kagmole, Maio 27, 2025.

  1. kagmole

    kagmole Guest

    When using @angular/localize, we mark string to translate with i18n* attributes in the templates and use $localize in the components code. Those string are then extracted with ng extract-i18n into an XLIFF file.

    Now we are using an API that returns an envelope with the actual payload.
    In the envelope, we have known codes that can be used to displayed information about requests, like "success", "invalid form, please check data filled", etc.
    What is the best way to add those string ID to the generated XLIFF files by ng extract-i18n?

    We could create a dummy template with all the strings, but this seems... wrong?
    Or is it the way to go?

    Continue reading...

Compartilhe esta Página