Not quite sure how you mean, but if you get the English word with an article, you should have the Swedish word with an article too. So if you're asked to translate "A dinner", the answer should be "En middag" and if you get just "Dinner" (this should never happen) you should translate it into "Middag".
If you don't know the gender of a word, en is your best bet, because those words are most frequent. Also, if you knew the gender of the word dag, "day", you could infer that it would probably be the same here.
Swedish and English are similar in this, sometimes you need an article, sometimes not. So in "Jag äter middag" there's no article, just the same as in "I eat dinner". We don't always use an article when you do, and vice versa, so you'll have to look out for the cases where it differs.