Translation:The children pretend that they are Vikings.
In this specific context, children playing pretend, it's not uncommon to hear "the children play doctor" or "the children are playing cops and robbers". My first instinct was to say "the children are playing Vikings", but obviously that's not going to agree grammatically. "The children pretend that they are Vikings" is an acceptable translation, but I wouldn't actually say it in a conversation. Not the best example for an educational tool I don't think.
The preferred answer is grammatically fine, but is neither the most faithful nor the most natural translation of the Swedish.
If my children were engaged in the activity described by the Swedish, the thought that would immediately spring to mind as a native speaker of British English is:
The children are playing at being Vikings.
Pretending to be Vikings just doesn't convey the same nuance of playfulness at all, since it's not hard to imagine a situation, such as a school project, whereby children pretended to be Vikings without there being an implication of being at play.
Literal translation would be "the children play that they are Vikings", which would be understood in English but not sound 100% natural. Personally I would say either "the children pretend to be Vikings" or "the children play at being Vikings" (though that last one sounds quite stilted or old fashioned sometimes)
Is it necessary to say “... leker att de är vikingar”? Or would Swedes colloquially say things like “Barnen leker vikingar.”? I understand that this isn’t what we are intended to learn here but in my native German and in English I would just say “Die Kinder spielen Wikinger”/“The children play Vikings”. I imagine me visiting my Swedish acquaintances and asking “Vad gör barnen?” What would they probably answer?