Many thanks, @Andrew, for helping improve upon the LLM-generated aspects of the code.
As to your question: Key is the English term, and Long is the Latin term. From this we make two glossaries: one English-to-Latin, the other Latin-to-English. Within each list, I wanted the entries sorted.
I’d be very happy to learn how to restructure this based on a dictionary and functions as you suggest. This solution grew out of glossarium, though by the end it was self-contained enough to not require the package any further.