See e.g. this changeset. It's easy to translate once you've grabbed all the place=city nodes with capital=yes.
Unfortunately the capital=yes tag is somewhat confused since some people are adding regional capitals.
Comment from matata on 24 December 2009 at 09:15
Hello, I've tried to do the same with Arabic, but it's big work. so I'm trying to find a way to automate the work! do you have any ideas?
Comment from Ævar Arnfjörð Bjarmason on 24 December 2009 at 12:13
You mean automatically fill in Arabic capital names? They're only around ~300 so I just manually filled them in, it took less time than it would have to write a program to do it.
Comment from matata on 25 December 2009 at 07:07
Yes, but this is only the first step. my goal is to fill all the nodes with name:ar depending on wikipedia tag.