Library API
    Preparing search index...

    Function isEnglish

    • Checks whether all resolved locales in the input belong to the English language family ('en-*').

      Parameters

      • Optionallocales: unknown

        Single or multiple locale identifiers

      Returns boolean

      True if at least one valid locale exists and all resolved locales are English

      isEnglish('en-US'); // true
      isEnglish(['en-US', 'en-GB']); // true
      isEnglish(['en-US', 'fr-FR']); // false