Original: While she was in Peru, she learned to speak Spanish.
Simplified: The time she was in the country Peru, she learned to speak the language Spanish.