system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:How do historians or linguists decode and translate an ancient language that hasn't been spoken in a long time?

I just don't even know where one would start.
gpt
I suppose it depends on what the circumstances are. In cases like Ancient Egyptian hieroglyphs, there wasn't anything that could be done until we got our hands on the Rosetta Stone. 

Basically, we have two options depending on how ancient it is and if there is text surviving from it. 

If we have some sorts of texts from the language, they are compared to languages that are children of that ancient language. We can see residual words, phrases, sounds, and grammar from the children that can be compared to the parent language. We can then piece together different translatable portions so we can use context to determine other portions. It's certainly a very difficult task, and it's near impossible to make a full reconstruction without something like the Rosetta Stone in which a language still in modern use (sort of) is directly translating the unknown language.

The more challenging alternative is reconstructing an ancient language with no existing language data. In this case, the only thing that can be done is reconstruct a theoretical proto-language since there is nothing existing that can prove anything. It involves painstaking analysis of data on words, sounds, and grammar of languages born from that hypothetical language. 

It becomes a game of "what words seem to look similar in most of these languages? how can we reconstruct a proto-form from the similarities in those similar words (fake example: wodar, wuter, woter= possibly woter?)? how can we explain places where not all languages share a similar pattern/word for something?"

Proto-language construction is seriously a headache, and requires a lifetime dedication to something that can't be proven and may never truly be complete. 

Re-construction translation is also quite challenging, but fruitful and enriches our understanding of history in a big way. It's very similar to cryptology, since it's about decoding a system of coding (turning ideas/words in your head into words out loud/on paper) through puzzle-solving and looking at related codes to draw out similarities (which is why Navajo was such an uncrackable code during WWII...they couldn't draw on past codes' characteristics since it was built on nothing we were used to in codes OR in language grammar in real languages)

TL;DR: Very patiently, with luck and a very problem-solving oriented mind. Also, wall of text. Apologies.