I saw that angular6 implements i18n for its components and that by using i18n you can internationalize your html but can you do the same with typescript? I have two specific
You can use the Transloco library to do this: https://ngneat.github.io/transloco/.
And then get the translations in the Typescript file like so:
this.translocoService.translate('hello');