AngularTranslate allows you to translate tags from html itself or inside a controller through a promise. I believe that the elegant way to do what you want is to create a method / function in your controller that processes the translation the way you want, and then call that method / function in your html, passing the username as a parameter.
Specify the username in your JSON translation files as "USERNAME", for example, "Hello, USERNAME!", Translate the method created on the controller using AngularTranslate, and then replace the string by replacing the word USERNAME with the method parameter (real username ) and use this line as the return value of the method that will be called in your html.
Hope this helps.
source share