Writing good dialog is hard. It’s especially hard for historical fiction. How did people talk in some long ago period? A writer can get a hint from historical writing, but only a hint. People—at least prior to email and texting—wrote in a much more formal style than they spoke. As recently as twenty years ago, people wrote striving for grammatical correctness and they generally shunned slang they might use verbally.
Another challenge is to make every character sound different. Beyond personality differences; women, men, and children don’t talk the same. If every character speaks similarly, dialogue becomes akin to a vegan gluten-free green smoothie—boring in large doses.
The best way to give each character a distinct voice is to have a firm grasp of the character’s personality. Really know your characters. Allow them to speak for themselves … and if they happen to say something out of character, erase it.
The top goal of fiction writing is to move the story forward. This means dialogue should not interrupt the forward progress of a story. This argues for not going overboard on regional or historical accents. A reader should never stop to sound out some unusual speech pattern in order to figure out what the character said. For the most part, it’s better to offer hints of a bygone era rather than attempt to replicate it accurately. A light touch is almost always best. One of the great historical novels is Pillars of the Earth by Ken Follett. Read the book again for the language. You might be surprised. For the most part, it is written in modern English.
Oh, one more thing. In the early 1950s, Disney produced Treasure Island and Blackbeard the Pirate, with Robert Newton playing the lead role in both films. Newton also played Long John Silver in the TV series. In his portrayals, Robert Newton invented what became an iconic pirate dialect, including, “Arrrr, matey.” Was it accurate? Who knows, but it was entertaining … and understandable.