| Auszug |
|---|
|
Nuclos Translator: TranslatorFactory, ServiceLoader, META-INF/services, JSON, DeepL, localization, 4.2025.15, extension. |
Language: Deutsch · English
Translator
Custom translators for localization – TranslatorFactory, ServiceLoader and JSON configuration.
| Status |
|---|
| colour | Green |
|---|
| title | Updated: Jul 2026 |
|---|
|
| Status |
|---|
| colour | Grey |
|---|
| title | applies to Nuclos 4.2026.x |
|---|
|
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.
| Info |
|---|
|
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