How to approach word/letter specific translation?

So I’ve enjoyed the mechanic games like Final Fantasy X and No Man’s Sky where the player would have to discover objects to translate either letters of an alphabet (FFX) or entire words (NMS) of a language that is otherwise not able to be understood (see attached images).

2784753--201654--Screen Shot 2016-09-11 at 11.00.07 PM.png

I’m trying to figure out what would be the best scripting strategy for tackling this in a large game across several scenes, for translation on a word-by-word basis (like No Man’s Sky), rather than letter-by-letter. Toss all the dialogue in the game in a single file and do a search/replace for certain words as they are “translated”, create a bunch of global strings that represent different words and add them all together to create a single dialogue string that is “said”? Player prefs?

I feel like I’m missing some kind of obvious approach and any gentle nudge to the right path would be a huge help.

One factor that will matter is how are you handling the dialogue now, regardless of translated state. Is all your dialogue loaded into memory in some big data structure? Or do read from a file for the dialogue you need to pop it on the screen? Or some mix… load a section of all the dialogue needed for an entire area into a data structure… and just do this on scene loads, or some other factor?

Instead of storing the text in the game as gibberish and translating it to words the player can understand I would approach it in the opposite manner. Store the understandable text in the game and simply pass each segment of text through a function to “untranslate” it into gibberish as needed.

Words could be stored in memory using a dictionary with the key being the understandable form and the value being a class with two variables: one being the gibberish form of the word and the other being whether the player knows the word or not.