This post originally appeared on Salon by Nicole Karlis.

Courtesy of Salon.

Researchers suspect dogs can learn up to 165 words. While it's clear our canine friends can understand some of the native language their human parents speak, can their brains distinguish between different languages? For example, if they lived in a bilingual household?

It's a question a group of researchers from Eötvös Loránd University in Hungary was curious to answer as it was a personal issue for Laura Cuaya, an author of the study, who moved from Mexico to Hungary with her border collie dog named Kun-kun.

"Before, I had only talked to him in Spanish, so I was wondering whether Kun-kun noticed that people in Budapest spoke a different language, Hungarian," Cuaya said. "We know that people, even preverbal human infants, notice the difference. But maybe dogs do not bother. After all, we never draw our dogs' attention to how a specific language sounds."

Cuaya's personal experience was the impetus for a study titled "Speech naturalness detection and language representation in the dog brain," which was recently published in the peer-reviewed journal NeuroImage. Together, the researchers scanned the brains of 18 dogs, including Kun-kun, using functional magnetic resonance imaging to study which regions of the brain lit up when they heard words either from a language they were familiar with, or one they didn't know so well.

The researchers found that the canines' brains could understand speech from non-speech vocalizations (such as gibberish) by observing the activity in the primary auditory cortex after having the dogs listen to "natural speech" and "scrambled speech." For the "natural speech" test, researchers played a recording of a chapter from The Little Prince. And for the "scrambled speech" one, technology mixed sentences together to simply turn the text into an acoustic stimulus. Previously, similar kinds of tests have shown that rats, Java sparrows, and monkeys can understand the difference between speech and random noise without being specifically trained to identify a language.

After establishing dogs have the capacity to detect what they call "speech naturalness," the researchers proceeded to test if the dogs could understand the difference between Spanish and Hungarian. They did this by analyzing the secondary auditory cortex during the scans when The Little Prince was read in both Spanish and Hungarian. The researchers observed distinct activity patterns for each language in the secondary auditory cortex, and in the precruciate gyrus, of the brains suggesting that, indeed, they can identify the difference.

The observation is significant because it's the first time scientists have recorded that a non-human brain can tell the difference between two languages. Notably, the differences seemed to be more pronounced in older dogs, suggesting that they were better able to understand the difference after being exposed to human speech throughout their lives. The differences were also more pronounced in dogs with longer snouts, suggesting that there could be a breed factor to being a bilingual dog, too.

The cohort of dogs ranged in age from 3 to 11; in total, there were five golden retrievers, six border collies, two Australian shepherds, one labradoodle, one cocker spaniel, and three mutts.

"Language representation in secondary auditory and frontal cortical regions in dogs could reflect their capacity to extract certain auditory regularities which, despite perhaps not being specific to speech, characterize the temporal organization of continuous speech in a given language," the researchers concluded. "A more pronounced language representation in older dog brains suggests a role for the amount of language exposure."

Cuaya told NBC News that the results showed that dogs "know more than I expected about human language." But she wasn't surprised.

"Certainly, this ability to be constant social learners gives them an advantage as a species—it gives them a better understanding of their environment," Cuaya added.

The latest research adds on to exciting global research around dogs and language, like the study Bunny the Talking Dog partakes in, as Salon has previously reported.

Researchers on the team said there are more studies to do to better understand to what extent dogs can understand different languages.

"It is exciting, because it reveals that the capacity to learn about the regularities of a language is not uniquely human. Still, we do not know whether this capacity is dogs' specialty, or general among non-human species," said Attila Andics, senior author of the study. "Indeed, it is possible that the brain changes from the tens of thousands of years that dogs have been living with humans have made them better language listeners, but this is not necessarily the case—future studies will have to find this out."