Change getLocales to return an array of Locale