You don't use the keys of the array therefore you can use the simpler:
 foreach ($locales as $locale)