Added basic logic for getting locales.