Elsewhere in my code I compare snippets to these texts, and I think that means I need indexed texts. If texts work too, are they better?
The code I gave above was just an example. My actual game has nothing to do with translations; it was just the first simple example I could think of. Specifically, I am cobbling together my own parser to deal with references to nonexistent but possible things, so I need to process the player’s input.
I would prefer to be able to say ““pomme” translates the apple.” in one part of the source, and ““Apfel” translates the apple.” in a different part. With a single property I would have to declare everything at once. If there is something that allows me to extend lists (e.g. "The thesaurus of the apple (extended) is {“manzana”}.) I would use that.
Skinny Mike, the code you posted looks useful; thank you. Is there a way I expand it to allow multiple words? I have tried “Word-saying is an action applying to words. Understand “say [words]” as word-saying.” but that does not seem to work.