Translatador is a minimal C wrapper around Bergamot Translator, providing lightweight offline translation of text on the CPU. It additionally supports detection of 67 languages by providing bindings to whatlang-rs.
Translatador provides Java bindings, which you can find more about here.
This repository includes a simple example project to help you to get started with Translatador.
Translatador does not support training models: as such, you will need to use a pretrained model built for Bergamot. We recommend taking a look at Mozilla's CPU-optimized open-source models in the firefox-translation-models project, which are currently used for offline translation within Firefox.