Skip to content

About

macOS menu bar app for fast offline translation. Powered by Apple's on-device Translation framework. No account, no internet, no tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SwiftTranslate

As a non-native English speaker, in your corporate life, you sometimes just need to quickly translate a word or phrase without opening a browser. SwiftTranslate lives in your menu bar, responds to a hotkey, and translates entirely on-device. No account, no internet, no AI.


Features

  • Translate between 9 languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Japanese, Chinese
  • Fully offline — uses Apple's on-device Translation framework
  • Language auto-detection while typing
  • Auto-translate on paste and while typing (configurable)
  • Auto-copies result to clipboard (optional)
  • Global hotkey to open/close the app (⌥⇧T by default, customizable)
  • Translation history (last 50 entries)
  • Language pack manager in Settings — download only what you need
  • Launch at Login support
  • Right-click the menu bar icon for Settings and Quit
  • Liquid Glass UI — designed for macOS 26+

Screenshots

Translator window

Settings window

Requirements

  • macOS 26 (Tahoe) or later
  • Apple Silicon or Intel Mac

Installation

  1. Download SwiftTranslate.dmg from the latest release.
  2. Open the DMG and drag SwiftTranslate.app to your Applications folder.
  3. If macOS blocks this ad-hoc signed build, allow it in System Settings → Privacy & Security → Open Anyway.
  4. The first-run setup prepares English and German. Start both downloads in Apple’s dialog and finish it after installation. An internet connection is needed for this setup; translation then works offline. Additional languages are available in Settings.

Usage

Action How
Open / close Click menu bar icon or global hotkey (⌥⇧T)
Translate ⌘↩ or click Translate
Clear ✕ button next to Translate
Swap languages ⇄ button in the language bar
Settings Right-click menu bar icon → Settings…
Quit Right-click menu bar icon → Quit SwiftTranslate

Build from Source

Requires Xcode 26+ or Command Line Tools with Swift 6.2+ and the macOS 26 SDK.

git clone https://github.com/philippbev/SwiftTranslate.git
cd SwiftTranslate

# Debug build
swift build

# Release (universal binary)
swift build -c release --arch arm64 --arch x86_64

# Build a verified, ad-hoc signed DMG (use a new output directory)
bash .github/scripts/package-app.sh .build/install-candidate

# Run tests
swift test

macOS 27 Beta note: The project uses a local patched copy of KeyboardShortcuts (in Packages/) to work around a build issue with SwiftUI macro plugins missing from the macOS 27 Beta Command Line Tools. No changes needed — swift build works out of the box.

Architecture

State management is centralized in AppState (@Observable), injected into views via the environment. Translation sessions use Apple's TranslationSession API with .translationTask() SwiftUI modifiers. Language detection uses the NaturalLanguage framework with debouncing. The menu bar panel is a custom NSPanel subclass (PopoverPanel) that accepts key window status for reliable keyboard input.

Translation requests wait up to two seconds for a session matching the requested language pair. Clearing the input invalidates the request so late results cannot restore cleared text. Language packs download through one sequential queue, with retry support after errors or cancellation. Pack installation is verified after Apple’s preparation dialog before marking a pair as ready. The UI shows the current pair without inventing download percentages. Tests use isolated preferences and stub sessions without downloading language packs.

SwiftTranslate/
├── App/                  # Entry point, AppState, localization
├── Core/
│   ├── Models.swift      # SupportedLanguage, HistoryEntry, LangPair
│   ├── Persistence/      # HistoryStore, OnboardingStore
│   └── Services/         # HotkeyManager, LanguageDetector, LaunchAtLoginManager
├── Features/
│   ├── Translator/       # MenuBarView, MultilineTextField
│   ├── Settings/         # SettingsView, LanguagePacksSection
│   ├── History/          # HistoryView
│   └── Onboarding/       # OnboardingView (welcome → download → ready)
└── Resources/            # Localizations (de, en), app icon

Installation acceptance

First-run acceptance records the release criteria, the checks completed locally, and the remaining macOS 26 first-download check. Pull requests build and verify a universal DMG on macOS 26 with Xcode 26; the artifact is kept for seven days.

License

MIT — see LICENSE.

About

macOS menu bar app for fast offline translation. Powered by Apple's on-device Translation framework. No account, no internet, no tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages