Migrate from Angular's i18n
The Translation File
The migration script will extract all translations from your HTML files and generate a translations JSON file. The script will use the translation string as the key, converting it to kebab case (e.g., "My sample string
" โ "my-sample-string
"). Here's an example of the output JSON:
en.json
Example HTML section and matching JSON output
before.html
after.json
The .comment
suffix is used to support comments in Transloco.Note:
Directives
The i18n
and i18n-<attribute>
directives will be replaced with the transloco
pipe.
before.html
after.html
Last updated