Decodes the Locale from a languageCode-countryCode or languageCode format.
languageCode-countryCode
languageCode
This does not validate the actual language and country, it just validates the format.
if string is not a valid Locale.