MADRID, Spain (AP) _ A judge is questioning about 20 people, including diplomats, a prominent lawyer and a princess related to King Juan Carlos, in connection with alleged currency smuggling, news reports and legal sources said today.

The independent newspaper El Pais said Judge Luis Lerga ordered Tuesday that lawyer Eduardo Garcia de Enterria and his wife be jailed pending completion of an investigation, but that each was freed on $142,800 bond.

De Enterria was a consultant on political matters to Spain's former rightwing dictator, Gen. Francisco Franco, and last year he received a coveted social science award from the king.

Lerga has made no comment on the case. However, lawyers involved in the case and judicial sources said the total amount of currency involved may amount to the equivalent of about $17 million.

The legal sources said the investigation began when Francisco Palazon, 55, a retired diplomat and consul general in Geneva from 1975 to 1981, was arrested as he was about to fly to Switzerland from Madrid. The sources said he allegedly was carrying Spanish currency, but they did not say how much and they did not say when the arrest occurred.

Spaniards are allowed to take with them a maximum of 200,000 pesetas, the equivalent of $1,175, on each trip abroad. Offenses are punishable by prison terms of up to 12 years.

News reports have said that a second cousin of the king, Princess Maria Teresa de Baviera, and Juan Antonio Gamazo, the Count of Gamazo, are among those being questioned.

The princess told the Madrid radio station Cadena Ser on Wednesday that she never smuggled money out of the country. She said she had known Palazon for a long time, and that, ''I handed Palazon in Spain some money and I have no idea where he invested it. He used to give me income and that is all I can say on the case.''

Flight of capital from Spain has been a continuing problem following Franco's death in 1975, and especially since the Socialist Party took power in 1982.

Industrialists and other wealthy Spaniards, many of whom filled important jobs under Franco, fear the Socialists' economic policies.