I've seen やっぱり all too often blindly translated to "as expected". While that isn't a bad approximation of the meaning, it's frequently unnatural in a sentence. So, that brings up the question of what exactly やっぱり is used for. Basically, it appears when a situation is confirmed to be in agreement with previous expectations or assumptions.
やっぱり is derived from the more formal and proper やはり. The kanji 矢(っ)張り are ateji, chosen based on pronunciation with no regard to meaning, and this may be why both forms of the word are typically written in hiragana.
The goo online dictionary that I like to use lists three common meanings:
- Having no difference from what had previously been, or from what a comparable other is like. One example given is 「あなたは今もやっぱりあの店へ行きますか」 ("Do you still go to that shop now?"), where the assumption is that a situation that used to be the case (you go to that shop) remains true. Asking the question at all suggests that I don't know for certain whether you still do, but including やっぱり means I'm fairly confident that you probably do.
- Turning out just as anticipated. This is the flavor that's closest to the stock "as expected" translation. Their example is 「彼はやっぱり来なかった」 ("As expected, he never came.").
- Coming to the same conclusion after thinking things over. One example given is 「随分迷ったが、やっぱり行くのはやめにした」 ("I had a heck of a time deciding, but decided to pass on going after all."). Using やっぱり here means that while I might have wavered, my first impulse had been to not go, and in the end I didn't change my mind about it. An alternate interpretation in some cases is to take as the initial default case what an impartial observer might expect, so here that would mean that someone reading the story of my life would have expected me not to go.
There's a fairly good example of meaning (3) in the third Legend of Zelda game. One necessary step in the quest is to visit the Zora king to buy flippers that enable swimming in deep water. However, he charges an outrageous 500 rupees for them (in a game where you can't carry more than 999). At this point in the conversation, one of your options is 「やっぱりやめる」—basically a "never mind that after all". This may seem like a change of mind, and therefore clashing with the meaning explained, but I think it works here because backing down at this point would agree with your likely initial reaction of "That's crazy!" to his demands.
Another flavor of meaning I see now and then is a reaffirmation of an opinion already held. Anyway, as an example, one of the NPC lines in Final Fantasy VI goes 「やっぱり自由が一番！」 ("Freedom really is the greatest!"). It's not as though this is a new idea for the character, or a confirmation of a suspicion, but it's the first taste of real freedom after a time of occupation, and it's every bit as good as remembered. This probably fits best with meaning (1).
Similarly, やっぱり can be used when coming to a conclusion that seems obvious in retrospect, such as in Breath of Fire II when Sten decides he wants a date with both Nina and Lin Pu (Katt) instead of just one of them: 「あ、やっぱり りょうほうに しよう」
If you're translating something, try adding a little variety with phrases like "it figures" or "I knew it!" instead of the lackluster "as expected" when used as an interjection, or at least consider something a bit more natural like "I thought so" or "I figured as much". "I should have known" also works well in some contexts. Meaning (3) often equates well with phrases like "it really is" and "after all" depending on usage. Meaning (1) tends to be trickier, in that the essential meaning is often well represented by "still" (or "also" when comparing to a similar person or thing), but that doesn't do a very good job of conveying that it's expected to still be that way. Experiment with a few variations to see what works best in a given case.