LibreTranslate
A self-hosted translation API for text and files that works offline, uses Argos Translate, and is free under the AGPL-3.0 license.
Alternative to:

LibreTranslate is a machine translation service for developers and organizations that want translation to run on their own server. Its API connects translation to applications, while a web interface lets people translate directly.
- Text and file translation: Translate written text or upload a file and download the translated result.
- Language detection: Detect the source language automatically when you don't select it yourself.
- Application integration: Request translations through an API hosted on infrastructure you control.
LibreTranslate is free to download and open source under AGPL-3.0. Its Argos Translate engine can perform translations offline without relying on Google or Azure. The public website also provides hosted translation; text and files submitted there go to that service, while a self-hosted deployment processes them on your server.