If the only purpose of this is to check if the locale has been found then why not just loop through the returned array and exit early if we do find it? Instead of looping to the end no matter what.