"I am not English, but Hungarian."
Translation:Nem angol vagyok, hanem magyar.
It has to be hanem because the second part of the sentence is expressing a direct contradiction to the first part. Pedig is typically used when the two clauses are not logically contradictory or opposed to each other. It will almost never come directly after the comma (the way és, vagy, de, and hanem do) , but rather in the second position in the clause. A correct use would look like this:
Én angol vagyok, ő pedig magyar.
That could be translated into English in a lot of ways: "I am English and he is Hungarian," "I am English but he is Hungarian." "I am English, whereas he is Hungarian"... there is no real logical connection between the two parts, and pedig is kind of just a way of gluing them together. Really the most colloquial translation might be just to use a comma splice in English and say, "I am English, he is Hungarian." The English construction that most nearly matches the form of the Hungarian is probably, "I am English; he, on the other hand, is Hungarian."
The only thing I'd like to add is that if pedig comes right after the comma, it means "even though".
- Nem adott pénzt, pedig kértem tőle. -- He didn't give me money, even though I asked him.
- Nem köszönt neki, pedig ismeri őt. -- "He didn't greet her, even though he knows her.
- Van egy kutyám, pedig allergiás vagyok rá. -- I have a dog, even though I'm allergic to it.
Generally, when you are using this kind of construction ("not X, but Y"), the 'X' should come immediately after nem and the 'Y' should come immediately after hanem, in order to maintain parallelism.
As a rule of thumb, if it's done correctly, then when you cover up everything else in the sentence, it should still make some logical sense.
Correct: Nem angol vagyok, hanem magyar. If we cover up everything but what's right after nem and hanem, we get "nem angol ....... hanem magyar", "not English, but Hungarian", which makes sense and expresses the intended opposition.
On the other hand: "Nem vagyok angol, hanem magyar." becomes "nem vagyok .... hanem magyar" which doesn't make a lot of sense ("not I am, but Hungarian.")