I understand that in the emphatic construction X ydy Y (or X yw Y ) the first term is the one that sounds more prominent, and carries the emphasis.
For instance, Caerdydd ydy prifddinas Cymru means 'the capital city of Wales is Cardiff' (not Swansea, nor other cities), whereas prifddinas Cymru ydy Caerdydd means 'Cardiff is the capital city of Wales' (not the capital city of Scotland).
Is this interpretation correct?
Mae Caerdydd yn brifddinas Cymru would also work.
Roughly speaking, Caerdydd ydy prifddinas Cymru is the answer to "What's the capital of Wales?" and Mae Caerdydd yn brifddinas Cymru is the answer to "What's Cardiff?". (Edit: I'm no longer sure of that - I think that second one would be better as Prifddinas Cymru ydy Caerdydd, though I can't explain how this sort of things works.)
Which also explains why we introduce ourselves with something like Dewi dw i rather than Dw i'n Dewi - you're answering "Who are you?".
It's an emphatic construction where a subject is put even before the verb (which takes the form ydy or yw in this case rather than mae).
"prifddinas Cymru" is "the capital city of Wales" (including the meaning of "the") due to the noun-noun combination.
Some people explain it like this -- to form a phrase such as "the top of the hill", remove "the" and "of the" and then translate into Welsh, so you can "the top of the hill" - "top the hill" - "pen y bryn".
Such a combination can't take the definite article "y(r)" because it is already definite.
Then don't go to Cardiff! Seriously. Because of the university and the thousands of non-Welsh students, not to mention proximity to the English border, Cardiff doesn't really feel very "Welsh". Go somewhere more rural, or more westerly / northerly. I can't tell you where, because I've not explored much of Wales, but I've been to Cardiff many times, and have struggled to find anyone with whom to test out my new Welsh skills!