CMS-1765: Convert util_getLocales to use value objects