createLocale function
Implementation
Locale createLocale(String language) => language.contains('_')
? Locale.fromSubtags(
languageCode: language.split('_').first,
scriptCode: language.split('_').last,
)
: Locale(language);