Windtalkers does have some historical accuracy. The bit about the Navajos making up words for different military things is true. In the Navajo language, they didn't have words for bomb, submarine, colonel, and things of that nature. So they used words they already had to replace them. For example, a fighter plane was called a DA-HE-TIH-HI, or humming bird.
Yes, it is true that Navajos did have a white man to protect them - against both the Japanese and Americans. The Americans would confuse the Navajo for Japanese and fire on them. Some were even taken prisoner by the Americans and interrogated.
One such occurrence happened on Guadalcanal to William McCabe when he was trying to get something to eat. "I got lost among the big chow dump," he recalled, "All of a sudden I heard somebody say, 'Halt,' and I kept walking. 'Hey, you! Halt, or I’m gonna shoot!' There was a big rifle all cocked and ready to shoot. I’m just from my outfit, I was coming here to get something to eat. And he said, 'I think you’re a Jap. Just come with me.'"
To this date, the Marines deny that any orders were given to kill a Code Talker if he was to be captured.