Angular - custom key IDs

PHOTO EMBED

Mon Jul 15 2024 15:04:06 GMT+0000 (Coordinated Universal Time)

Saved by @lettuceranger #angular #lokalise #key-names

//To specify a custom ID in the i18n attribute or $localize tagged message string, use the @@ prefix. The following example defines the introductionHeader custom ID in a heading element.
<h1 i18n="@@introductionHeader">Hello i18n!</h1>

variableText1 = $localize `:@@introductionHeader:Hello i18n!`;

//The following example includes a description, followed by the custom ID.
<h1 i18n="An introduction header for this sample@@introductionHeader">Hello i18n!</h1>

variableText2 = $localize `:An introduction header for this sample@@introductionHeader:Hello i18n!`;
content_copyCOPY

Custom IDs in Angular, work for custom key names in Lokalise

https://v17.angular.io/guide/i18n-optional-manage-marked-text