NEW YORK, June 21 (Reuters) - The Australian and New Zealand dollars rose to their highest levels in about a month on Monday after China let the yuan rise to a five-year high,raising optimism about global economic recovery.

China's vow to allow a flexible yuan is expected to boost its buying power abroad. Given China's huge demand for raw materials, the move was seen spurring a rise in demand for commodities and gave a boost to commodity-linked currencies such as the Australian dollar.

Spot yuan rose to its highest level since its revaluation five years ago, bolstering hopes the flexibility pledge from China over the weekend would begin to reduce global imbalances and ease tensions in the Group of 20 leading economies ahead of a meeting next week.

The single European currency initially extended last week's recovery against the dollar, at one point rising to a one-month high, though gains faded as the New York session got underway. The dollar slipped versus a basket of currencies .DXY to a one-month low largely because of the euro's rise.

Until we know more from China, how much (they will allow the yuan to appreciate) and in what time frame, we probably won't be seeing much reaction in the major crosses, said Dan Cook, senior market analyst at IG Markets in Chicago. This is definitely ahead of the G20 to get them off the hook. Midway through the New York session, the higher-yielding Australian dollar AUD= gained 1 percent to $0.8807, off an earlier one-month peak. The New Zealand dollar NZD= rose 0.8 percent to $0.7117, after an earlier five-week high.

A higher yuan would help temper inflation in China by pushing down import prices, which in turn could mean Beijing would have less need to tighten monetary policy aggressively. Markets have been worried China could over-tighten and slow its economy too far which had raised concerns about Beijing's demand for natural resources, which would impact currencies which are part of the commodity bloc.

But some analysts were cautioning how long the latest news from China will impact markets. China has an incentive to frontload moves before the G20 meeting and the U.S. currency report, so we could see a continuation of these moves through most of this week and possibly into next, said Steven Englander, Citigroup's global head of currency strategy. But the incentives for China to make currency moves after the currency report is released diminishes.

Wells Fargo is forecasting a 4-1/2 percent gain in the yuan over the next year, compared to the 2-1/2 percent rise currently priced into the non-deliverable forward market.

 The euro swung between gains and losses through the global session. It was last down 0.1 percent at $1.2374 EUR= after earlier having rallied to its highest level since May 24 on trading platform EBS EUR=EBS.

European Central Bank governing council member Christian Noyer said on Monday some banks were facing funding problems, as banks continue to deposit cash at the ECB as a result of current market uncertainty. Traders said option barriers at $1.2500 were reportedly being protected by a major Asian sovereign account, which had prevented further gains overnight.

The euro rose against the low-yielding yen, gaining 0.4 percent to 112.82 yen EURJPY=R. The dollar was up 0.5 percent versus the yen JPY= at 91.16 yen.

The euro closed on Friday with its best weekly gain since May 2009 after a successful Spanish bond auction eased concerns over the health of Spain's public finances. The euro's recovery, however, is still uncertain.

The euro main focus is still the sovereign debt, said IG Markets' Cook. There are a lot of questions about the euro in general and as long as it remains quiet, it will remain at these levels. (Reporting by Nick Olivari; Editing by Andrew Hay)