When a big shipment of juicy, ripe mangoes arrived at the Alameda County Community Food Bank not long ago, everyone was sure that impoverished Central Americans living in Oakland would feast on them.

Wrong. The mangoes went untouched.

"They thought these were rotten," said Jessica Bartholow, the food bank's director of education, advocacy and outreach. "I'm looking at the same piece of fruit saying, 'This is gorgeous and delicious,' and the thing is, Central Americans eat mangoes when they're less ripe, green."

It was a valuable lesson in a region rich with cultural diversity. To keep up with the ebb and flow of the Bay Area's demographics, food banks now constantly change how they distribute food. Catering to the area's large immigrant populations means making their culinary preferences, religious restrictions and unfamiliarity with American foods as much a priority as filling hungry stomachs.

"There was a time 15 years ago where it was a struggle just to open the doors," said Paul Ash, executive director of the San Francisco Food Bank. "Now we can take a longer look and a more thoughtful approach."

That translates into knowing that Mexicans don't like artichokes because they have no idea what to do with the spiky leaves. Or that the Vietnamese, for whom fresh fish is a dietary staple, will eat canned chicken but avoid canned tuna. The Hmong shy away from canned goods because they are suspicious of eating foods they cannot see. And Russians will eat just about anything, as long as they have some dark bread to go with it.

After noticing that many immigrants were bypassing frozen vegetables or tossing macaroni and cheese into the bushes, food banks began reassessing how to serve immigrants, who often represent the majority of their clients.

Each month, Bay Area food banks serve about 500,000 people. Latinos and Asians make up more than half of the clients in San Francisco, Santa Clara, San Mateo and Napa counties. About 1 in 4 people served in Alameda County is Asian or Latino, and 17 percent of those served in Sonoma County are Latino. Food banks elsewhere in the region do not keep demographic statistics.

Eager to better serve its clients, the Alameda County food bank conducted a series of focus groups with immigrants to determine what they like and dislike. The Food Bank of Contra Costa and Solano occasionally posts recipes in the waiting room so people know what to do with food they may have never seen before, such as yellow tomatoes and squash. It also encourages food pantries and shelters to let people trade in anything they don't want.

"It was very, very enlightening, some of the things that we learned," Bartholow said of the Alameda County focus groups. "For some of the populations, the gold standard of food banking, canned foods, is not popular. You would think (all) canned meat products would be OK if one was OK, but that just wasn't the case."

They also learned that the adults in many immigrant homes will not eat American-style foods their children often love. For that reason, many families sometimes cook two dinners -- one for the parents and another for the kids.

When the food bank saw boxes of dried tofu given to Oakland's Chinatown residents appearing in community food drives, they realized Chinese immigrants prefer fresh tofu. They no longer send dried tofu there.

The Alameda County food bank began reaching out to Fremont's large Afghan community by sending shipments of dried beans and pork-free foods preferred by Muslims.

"We don't give (Afghan) people the pork and other things they don't like, " said Qurban Ahadi, 52, who moved to Union City from Afghanistan in 2001 and helps distribute food there. "Ham, they don't take it. And sometimes they don't like (nonfat) milk. ... I don't know why they don't like it. This is their habit."

Though the shift to distributing what advocates call "culturally appropriate food" has been gradual, a major event that set things in motion occurred back in 1996, when the federal government's sweeping welfare reform denied food stamps to legal immigrants. Food banks, such as Second Harvest in Santa Clara and San Mateo counties, surveyed immigrants to determine how to fill the void.

"We want to make sure the needs of these communities are being met appropriately," said food bank spokeswoman Jenny Luciano. "In San Jose, we've had an enormous influx of immigrant communities who need support from us in order to make ends meet."

Food bank workers noticed many Latinos and Asians threw away foods such as macaroni and cheese that were foreign to them.

"Sometimes we would have situations where they would walk away from a distribution site and we would find items discarded," Luciano said. "That's not a good thing to have happening with donated products."

The food bank, which is the largest in Northern California and feeds an average of 165,000 people each month, requires its shelves be stocked with foods common in the Asian and Latino diet. That means having lots of pinto beans, tortillas, long grain rice, fish sauce and ramen noodles on hand.

Last year, Second Harvest received a $400,000 grant from Santa Clara County to buy such foods. But for smaller food banks, catering to immigrants is not so easy. Many rely on donations from corporations, growers and individuals and do not have the luxury of buying specific foods for clients.

The Redwood Empire Food Bank in Sonoma County is among them, though it tries to cater to the county's ethnic communities.

"What we don't have coming in here daily are tortillas or enchiladas or something really specific to the Latino community. That, we would love to have, " said David Goodman, the food bank's executive director. "But we have an enormous amount of tomato products, so we hope that would help the families be on their way to preparing a meal which is culturally appropriate."

On a recent morning, food pantry workers from San Francisco perused the aisles of the city's food bank, where bulk sizes of juices, breads and other staples lined the shelves. They searched for foods they knew their clients would not refuse, having made such mistakes in the past.

"We don't get the beans," Rena Ilasa said, ignoring the cans of garbanzos and refried pintos. She distributes food mainly to Chinese and Filipino families through the Samoan Assembly of God Church. "Beans are not part of our culture. We know for sure they'll eat the noodles because they can mix it with their chicken or in soup."

Lee Foster, a volunteer with the Macedonia Missionary Baptist Church, which runs a food pantry in San Francisco's Western Addition, knows the neighborhood's senior centers are home to Russian and Asian immigrants and a large black community. The diversity makes shopping tricky.

"Russians like the rye bread and dark breads," she said, and "every time I come in here, I get as much sauerkraut as I can."