Demographers say a similar future awaits other European countries, and the issue grows more pressing every day as Europe’s seemingly endless economic troubles accelerate the decline. But bogged down with failed banks and dwindling budgets, few are in any position to do anything about it.

Germany, however, an island of prosperity, is spending heavily to find ways out of the doom-and-gloom predictions, and it would seem ideally placed to show the Continent the way. So far, though, even while spending $265 billion a year on family subsidies, Germany has proved only how hard it can be. That is in part because the solution lies in remaking values, customs and attitudes in a country that has a troubled history with accepting immigrants and where working women with children are still tagged with the label “raven mothers,” implying neglectfulness.

If Germany is to avoid a major labor shortage, experts say, it will have to find ways to keep older workers in their jobs, after decades of pushing them toward early retirement, and it will have to attract immigrants and make them feel welcome enough to make a life here. It will also need to get more women into the work force while at the same time encouraging them to have more children, a difficult change for a country that has long glorified stay-at-home mothers.

There is little doubt about the urgency of the crisis for Europe. Several recent studies show that historically high unemployment rates — in excess of 50 percent among youths — in countries like Greece, Italy and Spain are further discouraging young people from having children. According to the European Union, the total number of live births in 31 European countries fell by 3.5 percent, to 5.4 million from 5.6 million, between 2008 and 2011. In 1960 about 7.5 million children were born in 27 European countries.

Even before those trends were detected, many countries in Europe were expected to shrink by 2060; some, like Latvia and Bulgaria, even more than Germany. And the proportion of elderly will become burdensome. There are about four workers for every pensioner in the European Union. By 2060, the average will drop to two, according to the European Union’s 2012 report on aging.