Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Prepare an Angular component for translation by marking fixed template text with i18n, marking translatable attributes with i18n-attribute, and wrapping strings in component code with $localize. Add context for translators, use ICU expressions for plural or choice-dependent messages, then extract the marked strings into a source translation file with Angular CLI.
Mark fixed text in the template
Add i18n to each template element whose text should be translated. For example:
<h1 i18n>Hello!</h1>
For a translatable attribute, prefix its name with i18n-. For instance, mark an image’s title using i18n-title:
<img src="logo.svg" title="Company logo" i18n-title>
If text needs a translation marker but should not add a DOM element, use <ng-container i18n>...</ng-container>. Angular’s translation preparation guide documents these markers.
#1 Best Overall
Give translators context
Angular markers can include a meaning, a description, and a custom message ID in the form {meaning}|{description}@@{id}. Meaning can distinguish identical words used in different senses; description can explain where the text appears or what it refers to. For example:
<h1 i18n="site header|Introduction heading">Hello!</h1>
When text contains an interpolation, give the placeholder a useful name so translators can identify its role. Angular’s template syntax supports a comment on the interpolation, such as {{ username //i18n(ph="name") }}. Consult the guide for the exact syntax supported by your Angular version.
Mark strings in component code
Use the $localize tagged template literal for strings that live in TypeScript rather than a template. It supports the same meaning, description, and custom-ID metadata convention, introduced after a colon:
Rank #2
const title = $localize`:site header|Introduction heading:Hello!`;
For interpolated expressions, explicit placeholder names can make their purpose clearer in the extracted message. See Angular’s $localize API and preparation guide for details.
Use ICU expressions for changing messages
A message whose wording depends on a quantity or a choice should be translated as a whole, with its alternatives represented in an ICU expression. Angular documents plural for quantities and select for alternatives based on a string value. Include the applicable cases and an other fallback.
{minutes, plural, =0 {just now} =1 {one minute ago} other {{{ minutes }} minutes ago}}
This English example is a pattern, not a universal set of plural categories. Rules and grammar differ by locale, so translators need the full message and its context rather than separate English fragments.
Rank #3
Install localization support and extract messages
For projects that need Angular’s localization package, add it with the CLI command documented in Angular’s package guide:
Free tools Windows power users keep installed
One-click scans. No signup required.
ng add @angular/localize
The command updates package and TypeScript configuration. The documented --use-at-runtime option puts the package in dependencies instead of the default devDependencies placement. The appropriate setup can depend on the project’s Angular version and build configuration.
Once messages are marked, run extraction from the project root:
Rank #4
ng extract-i18n
By default, Angular writes messages.xlf. Extraction options can change the output format, filename, and directory. The usual handoff is to extract the source file, create a translation file for each target locale, translate those files, and handle any plural or alternate expressions. See Angular’s translation files guide for the available options and workflow.
Understand and maintain message IDs
Angular generates IDs for marked template and $localize messages. IDs are based on the source text and meaning; a description does not change an ID. Messages with the same text and meaning can be extracted once even when their descriptions differ, while different meanings produce different IDs. These rules are described in Angular’s custom ID guidance.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A custom ID can meet a translation system’s required syntax or carry application metadata, but it changes the maintenance tradeoff:
- Changing source wording does not change a custom ID, so its existing translation may no longer match the source.
- Keep custom IDs unique. If different source strings share an ID, Angular can use one extracted translation for both locations.
Review extracted messages and their IDs when wording or meaning changes. Avoid adding custom IDs unless their stability or naming is useful to your workflow.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choose a delivery model with runtime behavior in mind
Template markers and $localize identify messages; they do not by themselves decide how translated text is delivered. Angular’s documented extraction workflow produces translation files for translated builds. The $localize API also supports loading translations at runtime, but that is not live language switching: a message is processed the first time it is encountered, and loading another translation later does not update text already processed. Angular’s loadTranslations API documentation notes that refreshing the browser is needed for changed runtime translations to take effect.
The official guidance reviewed on October 7, 2026 does not specify a precise Angular release for these instructions. Check the documentation and CLI behavior for the version installed in your project.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

