IsBcp47ForEnglish🔗

Type: Pattern verification
Check that the text corresponds to a BCP47 code for english.

Code

pattern = f"^(en|EN)(-.*)?$"

return match(pattern, text) is not None