John Ronald Reuel Tolkien -- Ronald to family & relatives, John Ronald to school chums, Tolkien to scholastic acquaintances, Tollers to later collegial friends, J.R.R. Tolkien to his publishers & readers, and often J.R.R.T. to correspondents -- was born in January 1892 at Bloemfontein, capital of the Orange Free State of south Africa. Bloemfontein was a multilingual environment, with British merchant families speaking English and Boer natives speaking Dutch/Afrikaans; Ronald spoke both languages freely in his earliest years. As a toddler there he was bitten by a large tarantula, which may have inspired his later tales of monstrous spiders and their venomous bites.
Taken to England with his baby brother Hilary for a family visit in 1895, and remaining there following the death of his father Arthur from rheumatic fever early the next year, Ronald gradually forgot most of his Dutch but retained a precocious language facility: he was reading by the age of 4 and writing not long after (penmanship skills were unusually strong in his mother Mabel's family); schoolwork started with him reading & speaking Latin and, based on his obvious interest & language talent, French (which he did not much care for, due to its unpleasant sound).
With only a modest income from her deceased husband's investments, Mabel moved the brothers in 1896 to Sarehole, a country hamlet south of Birmingham. The setting was near-idyllic. A mill operated alongside a creek across the road, and the young boys frequently went to watch the millers at work and to steal mushrooms from a nearby farmer (who would, of course, chase them and whip them if he caught them). It was here that Ronald began to exhibit an obvious love for trees, which he would draw, climb, and even talk to; it was also here that he began picking up West Midlands dialect terms including gamgee 'cotton wool' (its inventor being a Dr. Gamgee). For reading material Mabel supplied Alice in Wonderland, books by George MacDonald about misshapen malevolent goblins beneath the mountains, and fairy tales by Andrew Lang including Sigurd slaying the dragon Fafnir. Around age 7 Ronald wrote his first dragon story, which led to his first serious study of English grammar.
In 1900 the family moved back to Birmingham so that Ronald could enroll in King Edward's School; it was in the suburb Mosely where he first encountered Welsh (via names on railroad cars), which was later to inspire his invention of the Grey-Elven language Sindarin. By 1903 he was studying Greek, and of course English literature, which included the Middle English language. Concerning Shakespeare, however, he was disgusted by the shabby artifice via which the author brought Birnam Wood to Dunsinane: John Ronald imagined the trees marching to war! In the winter of 1903-04 he began learning German from his mother, who died late in 1904 leaving her orphan sons under the guardianship of Father Francis Morgan, a fluent Spanish speaker.
By 1907 John Ronald was reading Spanish, and he invented a language (Naffarin) based on it. He began reading Anglo-Saxon that fall, including Beowulf where the hero kills monsters and a dragon; Anglo-Saxon, a.k.a. Old English, inspired his later invention of the language of Rohan, as well as Hobbit and other personal & place names, etc. That same year he began studying classical linguistics (philology) and reading Old Norse, including the original saga where Sigurd slays Fafnir. The next language in line was Gothic, an extinct poorly-attested Germanic tongue for which he invented words to fill vocabulary gaps; following that exercise he invented a supposedly unrecorded Germanic language using sound historical linguistic principles. This phase of his studies led to his inventing languages by starting with real or hypothetical earlier languages and simulating their evolution through time.
In early 1910 Tolkien was enchanted by Peter Pan, and that year he was reading Francis Thompson's poetry about elves & woodland sprites (who promptly vanish if the watcher moves). In spring 1911, not long after his successful Oxford entrance exams, he discovered the Kalevala and, with it, Finnish -- which later inspired his invention of the High-Elven language Quenya. That summer, while hiking with family members in Switzerland, he found a picture postcard showing Josef Madlener's Der Berggeist 'The Mountain Spirit', a painting that inspired his vision of the wizard Gandalf. The pieces were now in place, and his mythology commenced with his 1914 poem "The Voyage of Earendel the Evening Star."
Humphrey Carpenter. J.R.R. Tolkien: A Biography. Houghton Mifflin, Boston & New York, 2000.
The biographical sketch above, derived primarily from Carpenter, suggests how J.R.R. Tolkien came to invent his mythology based first on actual (often ancient) languages; out of languages their speakers emerge, and through them their stories. Tolkien did not ordinarily invent language "out of whole cloth," but relied for his inspiration on the sounds of interesting words he encountered -- at times, irrespective of their meanings. As a student of philology he was aware that language sounds change over time and, by this means (among others), languages evolve. Therefore his languages too had to evolve, to reflect the passing of the ages; and just as language sounds do not vary arbitrarily, but follow patterns of change, his evolving languages had to exhibit patterns of change.
One of the ways in which Tolkien retained patterns in the evolution of his languages was via conscious parallels with existing human languages, often Anglo-Saxon (Old English) as it evolved into Middle and then Modern English. And so it was that Tolkien might start with an Old or Middle English word, which may not have survived into modern English by some quirk of fate, and from it "evolve" a perfectly modern-sounding word or name (e.g. OE máðum > mathom); or, if a word actually did survive, he might change the spelling to an alternative form reflecting a highly plausible but slightly different evolutionary path (e.g. crick [in Crickhollow] instead of creek). Another way in which he derived recognizable names was via adoption from tongues related to English, such as Old Norse (e.g. for dwarf names, such as ON Dvalinn > Dwalin).
As part of our Indo-European Lexicon work, we have attempted to identify original sources for Tolkien's "invented" words & names; where [we believe] we have succeeded -- and where those originals are known to have actually evolved from Proto-Indo-European roots -- we have included Tolkien's "invented" forms in our English Reflex Index and among English words derived from those PIE roots.