What file of the code is the game's text formatter?

Hello.

I’m looking for the code of TrinityCore 3.3.5, where the text shown in the game is formatted, more specifically where it replaces the “variables” with their “values” ($N for the player’s name, $R for race, $C for clase…), as I want to introduce some new ones. Can you say me what file do it, please?

Thank you.

Ok, the client do this work, I’ll try make a server-side parser.