hammerspoon2-docs
    Preparing search index...

    Function session

    • Create a translation session for a language pair. Returns an HSTranslationSession, or null if the system is running macOS older than 26.0.

      Parameters

      • sourceLanguage: string

        BCP-47 code of the source language (e.g. "en").

      • targetLanguage: string

        BCP-47 code of the target language (e.g. "fr").

      Returns HSTranslationSession | null

      An HSTranslationSession, or null on unsupported versions of macOS.