These are pre-localized strings, most likely.
For localization, there will be a primary identifier (like
$Spells) that is used to look-up the correct text in a big translation table loaded depending on the active language.
These identifiers are also often used to help find the correct voice or texture for in-world elements. For instance, if a wall is supposed to show a sign texture, the wall might be painted with the texture identifier
$sign_1 which is then looked up in the translation table. If the table is set to French then
$sign_1 possibly maps to a resource path string like
/textures/localized/fr/route_dangereuse.dds while in the English table it might map to
/texture/localized/en/dangerous_road.dds. (Games these days are perhaps more likely to dynamically generate the text to avoid texture pack explosion, but you get the idea.)
Using the special symbols may be part of the tooling the engine uses. For instance, if the translation for
Inventory is requested but no translation is found, the system might return a marked-up result like
$Inventory) as this will make the game more usable during development but still makes untranslated text "obvious". It may also just help for any search-and-replace the developers might do for hard-coded UI strings, though that's hopefully a very rare problem in most games; this then might imply that the weird character is convention rather than a technological artifact.
Building off of @AminePaleo's answer, it's also possible that the engine has a text substitution engine that looks for certain patterns and performs the translation. e.g.
Go to $location now. might parse out
location as the name of an entry in the current quest. This will generally be done after localization though, since grammatical structure will be different between languages. So the game might have a string like
!go_to_location which is looked up in the localization table and is
Go to $location now in English, and then
location is the quest's target location, whose localized English name is
Seattle, so the final output after all stages of translation would be
Go to Seattle now..
Most games will keep any kind of two-stage lookup like that to a minimum, though, due to the extreme difficulty in composing natural-sounding English (much less French, German, etc.) from sentence fragments (getting the English articles - a, the, an, etc. - right is itself surprisingly difficult, given that the correct article changes based on both the sentence structure and the noun in question, e.g. whether it's proper, plural, definite, uncountable, etc.).