Children under 12 years old will be able to learn any languages like the native speakers. When an American family lives in France, for instance, then they have a baby who then socializes with his French friends until, say, 7 years old, he will be able to speak French like a native speaker. This happens because in children under 12 years old, there is no lateralization. That is, the two hemispheres are not “separated” yet to be given their own function. They both are flexible, they can accept any commands. That is why patient with stroke under 12 can get 100% recovered in acquiring language, while adults just have little chance to get 100% recovered.
After 12, lateralization process begins. The brain will not be as flexible as before. Ability to speak like a native will decrease. That is why an adult learning foreign language will almost sound like a foreigner, even though he stays for a long time in the country where the language is used in everyday life. He may master the grammar rules, but still his accent will sound like a foreigner.