Create a Locale from a language code and optional country code.
static Locale toLocale(String languageCode, [String? countryCode]) { return Locale(languageCode, countryCode); }