A thriving economy can lead to the extinction of some languages, scientists believe.