Breakdown of Wir gehen morgen in die Stadt, zum Beispiel in die Bibliothek.
Questions & Answers about Wir gehen morgen in die Stadt, zum Beispiel in die Bibliothek.
The preposition in can take either accusative or dative in German:
- Accusative (Wohin? – where to?) = movement into something
→ in die Stadt = to (into) the city / into town - Dative (Wo? – where?) = location, no movement
→ in der Stadt = in the city / in town
In your sentence, you are going (movement) to the city, so German uses the accusative: in die Stadt.
If you were already there, you’d say:
- Wir sind in der Stadt. – We are in the city.
Here, zum Beispiel in die Bibliothek is an extra piece of information, like an aside: for example, to the library. German usually separates such parenthetical additions with a comma.
You could think of it as:
- Wir gehen morgen in die Stadt, (zum Beispiel in die Bibliothek).
So the comma marks zum Beispiel in die Bibliothek as a kind of parenthetical comment that specifies an example of where in the city you might go.