|Image taken from this interesting blog post about tweeting|
with an accent
Dialect is regional differences in speech. The southern drawl, the New England flattening of r's, the tight-lipped midwestern accent, all have a distinct pattern that one could easily write phonetically, so you can hear how the characters sound. For most readers, the example that comes to mind when you talk about dialects is Mark Twain's The Adventures of Huckleberry Finn. Misspellings abound, because words are written how the characters would pronounce them.
I'm not telling you to avoid dialect because I'm a grammar prescriptivist and cringe at misspellings, though. Bad grammar and misspelling can work in dialogue. The reason I so strongly recommend against it is because it's distracting. It slows the reader down.
Yes, dialect can also show a reader, quite distinctly, what a person sounds like. If I were to write in a book that someone said he had to "pahk the cah," you might guess that the person was from Boston or thereabouts. But, how long would it take you to figure out what that character needed to do? If you had no other clue I was approximating a Boston accent, you might have to say it aloud before the words made any sense. That's time you could've spent reading along to the next sentence.
In general, try to avoid anything that slows or stops your reader. It's bad enough you're giving chapter breaks or shifts in perspectives or jumps in time, but actually stopping a reader in the middle is one of the biggest blunders you can make. That's also why info dumps should be used sparingly, and why it's so important to achieve suspension of disbelief. You want to keep the reader in the story.
There are ways to imply dialect without forcing your reader to translate your dialogue. What I call soda might be called tonic, Coke, or pop, depending on where my characters are from, and a milkshake could be a frappe or a cabinet in certain parts of New England. If you're writing about Southerners, there's the ubiquitous "y'all," or, in part of Appalachia, "yins." When I lived in the South, I was constantly running up against requests to "put it up," instead of, "put it away," and I inspired more than a few stares when I remarked it was wicked hot outside.
Use regional differences realistically, though. A transplanted Southerner may emphasize her accent because Northerners find it cute, or she might do her best to get rid of it because of the assumption that Southerners are uneducated. (Please believe me when I say that I saw no basis for that stereotype where I lived down South.)
Just as your use of adjectives with negative connotations can build a sense of dread in a scene, the words characters choose can say a lot about them. You don't have to mangle your spelling to show your readers that a person just moved to town from far away.
And, for crying out loud, don't spell out foreigners' pronunciation. It's not only bad for the above reasons, it's insulting. Imagine your high school foreign language teacher transcribing your mistakes for publication, and you have a vague notion of what it's like.