Nuclos Translator: TranslatorFactory, ServiceLoader, META-INF/services, JSON, DeepL, localization, 4.2025.15, extension.

globe with meridians Language: Deutsch ยท English

open book Translator

Custom translators for localization โ€“ TranslatorFactory, ServiceLoader and JSON configuration.

On this page

With Nuclos 4.2025.15, a localization mechanism was added that allows additional languages beyond the fixed system locales (de-DE, en-GB). It translates all relevant application texts (not data). These texts can be translated automatically โ€“ this requires a Translator implementation as an extension.

TranslatorFactory

A TranslatorFactory produces the translator instances and registers itself with the system. Nuclos finds factories via the Java ServiceLoader; therefore a file META-INF/services/org.nuclos.api.l10n.TranslatorFactory with the factory's FQN must be provided.

Configuration

Configuration is done flexibly via JSON (no structural requirements). A localization's JSON takes precedence over the one on the translator and overrides it completely when an instance is built for that localization.

An example (DeepL translator) is in the Nuclos repository. The productive DeepL setup is described in the administration; see also localization/interface languages.

Related pages

gear Extensions


Extension.

Open โ†’