textConvert
    Preparing search index...

    Function detectLanguage

    • Detects the most likely language of a given text

      Parameters

      • text: string

        The text to analyze

      • minLength: number = 4

        Minimum text length for reliable detection (default: 4)

      • options: { maxCharsToAnalyze?: number; useCache?: boolean } = ...

        Additional options for detection

      Returns LanguageDetectionResult

      Language detection result with confidence score

      detectLanguage('Bonjour le monde'); // { language: 'French', ... }