Angular
info
some manual changes might still be needed after the script ran.
The script will iterate over all your HTML files, build a translation file and will execute the replacements described below.
#
The Translation fileThe script will extract all the translations from the HTML files and will construct a translations JSON file.
The script will use the translation string as the key by making the entire string kebab case (My sample string
=> my-sample-string
) example for the output JSON:
Here is an example of an HTML
section and the matching JSON
output:
Will output:
Note: the .comment
is the way we support comments in Transloco.
#
DirectivesThe i18n
& i18n-<attribute>
directives will be replaced with the transloco
pipe:
If you encounter any issues with the migration script please open a Github issue so we can resolve them and make a better experience for all.