As expected; sure enough — used when something matches prior expectations or predictions.
やはり彼が犯人だった。
Sure enough, he was the culprit.
試験は難しかったが、やはり合格は無理だった。
The exam was hard; as expected, passing was impossible.
予想どおり、やはり雨が降り始めた。
Just as predicted, it began to rain.
After all; in the end — indicating that after consideration or events, a certain conclusion holds true.
いろいろ悩んだが、やはり留学することにした。
I worried about it a lot, but in the end I decided to study abroad.
話し合った結果、やはり彼の案を採用することになった。
After discussion, we decided after all to adopt his proposal.
試してみたけれど、やはり元の方法が一番だった。
I tried it, but after all the original method was best.
Also; too; likewise — used to indicate that something applies in addition to something else.
私もやはり同じ意見です。
I also share the same opinion.
彼は忙しい。やはり来られなかった。
He was busy. As expected, he couldn't come.
英語も大事だが、日本語もやはり重要だ。
English is important, but Japanese is also important after all.
Still; as before — indicating that a situation remains unchanged.
引っ越してもやはり朝はコーヒーを飲む。
Even after moving, I still drink coffee in the morning.
年を取ってもやはり彼は優しいままだ。
Even with age, he is still kind as before.
問題が残っているが、やはり希望はある。
Problems remain, but there is still hope.
Even so; nonetheless — used to emphasize that something is true despite circumstances or objections.
失敗したが、やはり諦めたくない。
I failed, but even so I don't want to give up.
反対の意見もあったが、やはり計画を進めることにした。
There were objections, but nonetheless we decided to proceed with the plan.
寒い日だった。それでもやはり彼は外で働き続けた。
It was a cold day. Even so, he kept working outside.