Angular 2: i18n of strings in source code
<p>In official NG2 docs described the way to translate text inside html templates <a href="https://angular.io/docs/ts/latest/cookbook/i18n.html" rel="nofollow">docs</a>. However it is sometimes necessary to translate text strings in source code also. i.e. string passed to alert() function.</p>

<p>How to implement it with official i18n support?</p>