I couldn't understand this structure 住んでいた時


私はローマに住んでいた時に子供でした。

I didn't understand "住んでいた時". I would like a explanation about this structure
and a translation.




> 私はローマに住んでいた時に子供でした。  
>  When I was in Rome, I was a child.

とき(に) means "when ～". See [this article](http://www.learn-japanese-
adventure.com/toki-in-japanese.html).

As you can see in the link, とき here is just a noun that means "time". So once
you have learned how to modify a noun (e.g., using an adjective or a relative
clause), you can use various ways to say "when ～".

As pointed out in the comment section, this sentence is a bit unnatural
because the main subject (私は) and the main predicate (子供でした) are far apart.




> 私はローマに住んでいた時に子供でした。  
>  When I was in Rome, I was a child.

とき(に) means "when ～". See [this article](http://www.learn-japanese-
adventure.com/toki-in-japanese.html).

As you can see in the link, とき here is just a noun that means "time". So once
you have learned how to modify a noun (e.g., using an adjective or a relative
clause), you can use various ways to say "when ～".

As pointed out in the comment section, this sentence is a bit unnatural
because the main subject (私は) and the main predicate (子供でした) are far apart.

