Translation:The history of Esperanto had been written many years ago.
Can 'estis skribita' mean both 'was written' and 'had been written'? (I got away with the former.) If so, is there a way to distinguish between the two?
"Was written" and "had been written" are two different ways to say the same thing, are they not? It's like "to the left" vs. "on the left". Why would one need to differentiate the two English phrases?
No; "was written" indicates that something took place then, while "had been written" indicates that something had already taken place before then.
"When I came home, my mother was cooking dinner." - She was still doing it at the time when I came.
"When I came home, my mother cooked dinner." - She started doing it when I arrived.
"When I came home, my mother had cooked dinner." - The cooking was already finished before I arrived.
"Had been written" is like the "had cooked dinner" sentence - it indicates that the writing was completed before the time that we are talking about, before the time "many years ago".
"Was written", on the other hand, is like the "was cooking dinner" or "cooked dinner" examples - it indicates that the writing took place at the time we are talking about (not before), so during the time "many years ago".
Nah, mate. "Was written" and "was cooking" are not the same. The equivalent with "to write" would be "was being written".
That's not was mizinamo was talking about here, though. Jamthom8 is talking about active versus passive, and mizinamo is talking about the simple past tense (in the passive, in this case) versus the past perfect.
Here's an alternative example to try to make it clearer:
"was written" is simple past (in the passive), e.g. "The history of Esperanto was written many years ago." (This sentence stands alone and does not imply anything else.)
"had been written" is past perfect (in the passive), e.g. "The history of Esperanto had been written many years ago, but Joan hadn't discovered the language until she was 65." (The past perfect often pops up in fiction-style past-tense writing such as in this second sample sentence, in order to indicate what the "actual past" is for characters whose present moment is already being described – thanks to the conventions of fiction – with the past tense.)
Fine. But "was written" (finite verb in the simple past) and "cooked dinner" (finite verb in the simple past).
I don't know about linguistic terms, but "was written" and "cooked dinner" are still not the same. "Was written" would go with "was cooked" and you could say something like "pheasant was cooked that way for many years before the new chef arrived" or "pheasant had been cooked that way for many years before the new chef arrived" and both mean the exact same thing. Both forms are covered by the same form in Esperanto: "estas [ ]-ita".
"No, "was written" is not the same as "had been written". "The history of Esperanto was written many years ago" means that many years before now, someone wrote the history of Esperanto. "The history of Esperanto had been written many years ago" means that many years before now, the history of Esperanto had already been written. I think that is what is known as the pluperfect tense.
Yes, it can mean either.
I suppose if you really want to distinguish them you could use "estis estinta skribita" for "had been written" (the first "esti" being auxiliary for establishing time, the second "esti" being auxiliary for passive, and then the main verb), but that seems really clumsy to me.
I'm not sure of a good alternative for "was written"; "estis estanta skribita" seems to be the wrong tense.
Esperanto doesn't distinguish between "was written" and "has been written".
No offence, but you're still thinking in English and not in Esperanto.
Edit: I should clarify, it will make sense when you start to think in Esperanto.
Are you sure that Esperanto doesn't distinguish between "was written" (estis skribata?) and "has been written" (estas skribita"?
Just for the sake of practice, what about La historio estas skribita dum multaj jaroj? I think the sentence you wrote should be translated as “By now, the history is being written for many years”.