IsBcp47ForEnglish🔗
Check that the
text corresponds to a BCP47 code for english.
Code
pattern = f"^(en|EN)(-.*)?$"
return match(pattern, text) is not None
text corresponds to a BCP47 code for english.
pattern = f"^(en|EN)(-.*)?$"
return match(pattern, text) is not None