MEXICO CITY — In southern Chile, young speakers of Huilliche, a language that’s in peril of extinction, produce hip-hop videos and post them on the Internet.

Across the globe in the Philippines, teenagers think it’s “cool” to send mobile phone text messages in regional languages that show signs of endangerment, such as Kapampangan.

Technology, long considered a threat to regional languages, now is being seen as a way to keep young people from forsaking their native tongues for dominant languages. YouTube and Facebook, as well as Internet radio and cell phone texting, are helping minority language groups stave off death.

Linguist Samuel Herrera said he was elated to find teenagers zapping each other with text messages in Huave, an endangered language spoken only by about 15,000 people in the Tehuantepec region of Mexico, along the Pacific.

“This really strengthens the use of the language,” said Herrera, who runs the linguistics laboratory at the Institute of Anthropological Research in the Mexican capital.

Dr. Gregory D.S. Anderson, the director of the Living Tongues Institute for Endangered Languages in Salem, Ore., agrees. Somewhere between the ages of 6 and 20 or 25, he said, “people make a definitive decision whether to break with the language.”

“If the language isn’t being used by their peer group, then they reject it categorically,” he said.

Technology as simple as text messaging can draw them back.

“That’s exactly the hook for young people. They live in text, and they are the key stakeholders and the ones who may or may not pass it down to their own children,” Anderson said.

The “cool” factor is helping to resuscitate Chulym, a nearly moribund Turkic language that’s spoken by a dozen or so people in a pocket of remote Central Siberia, said Anderson, who’s working to revive the language.

By offering teenagers in the community access to technology, “we have seen a significant increase in the desire among young people to try to learn the language from old people,” Anderson said.

Anderson and his colleague, K. David Harrison, a Swarthmore College linguist, say hip-hop music is an effective tool to get young people interested in their ancestral tongues. They’ve posted hip-hop songs on a dedicated Enduring Voices YouTube channel in languages such as Huilliche, the endangered Chilean language, and Hruso-Aka, which is spoken in a remote northeastern corner of India.

In some parts of the world, where the Internet isn’t easily accessed, even conventional community radio can do wonders for a minority language.

That’s the case in the seaside community of San Mateo del Mar in Mexico’s Oaxaca state, where a tiny station, Radio Ikoots, broadcasts in the local variant of Huave.

“All the residents are tuned to the station,” said Herrera, the Mexico City linguist. They listen to find out “who is getting married, what fiestas are coming up, who’s cooked food that is for sale [and] if there is a funeral.”