Breakdown of Sie hängt das Kleid in den Schrank.
sie
she
in
in
das Kleid
the dress
der Schrank
the cupboard / the closet
Questions & Answers about Sie hängt das Kleid in den Schrank.
Why do we use in den Schrank (accusative) instead of in dem Schrank (dative) here?
in is a two-way preposition. Because she is actively moving the dress into the closet, we are answering the question "Where to?" (Wohin?). For direction and movement toward a destination, two-way prepositions use the accusative case. If the dress were already just hanging there (location / Wo?), we would use the dative (in dem Schrank).
How can I tell the gender of Schrank just from this sentence?
You can figure it out by looking at den! Since the destination uses the accusative case, and only masculine nouns change their "the" word (from der to den) in the accusative, Schrank has to be a masculine noun (der Schrank).
I've seen hängen used when something is already hanging up. Is it the exact same verb?
Yes, but it is used slightly differently depending on the situation! When someone actively hangs something up, you use it with a direct object (das Kleid) and a destination in the accusative case. If you just want to state a fact like "The dress is hanging in the closet" (no movement), you still use hängen, but the location is put in the dative case.
Why does the translation say "is hanging" if the German sentence just uses hängt?