Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Status
colourPurple
titleHow-to
Status
colourBlue
titleApplication developer
Status
colourGreen
titleStandUpdated: Jul 2026
Status
colourGrey
titlegilt fuer applies to Nuclos 4.2026.x

Panel
bgColor#F4F5F7

Auf dieser SeiteOn this page

Inhalt
maxLevel2
minLevel2

Overview

...

Codeblock
languagejava
throw new InputRequiredExceptionBusinessException(
				new InputSpecificationDoNotTranslate(InputSpecification.CONFIRM_YES_NO, "my.nuclet.input.key.1",
"Soll eine Bestätigung gesendet werden?", "Rückfrage")); // vor v4.2025.15
throw new InputRequiredException(
				new InputSpecification(InputSpecification.CONFIRM_YES_NO, "my.nuclet.input.key.1",
true, "Soll eine Bestätigung gesendet werden?", "Rückfrage", Locale.GERMAN)); // ab v4.2025.15machineApi.getErrorMessage()));

The optimal way

Assign a fixed, unique localization key. This lets you change the source text later without rebuilding translations from scratch.

Codeblock
languagejava
MessageContext.sendMessage("Das Formular wurde erzeugt und im Laufwerk abgelegt."); // vor v4.2025.15
MessageContext.sendMessage(true, "Das Formular wurde erzeugt und im Laufwerk abgelegt."); // ab v4.2025.15throw new BusinessException(new DoNotTranslate(machineApi.getErrorMessage()));

Preventing translation

Pass the text as a DoNotTranslate object:

...

Dynamic parts via withArgs/withMessageArgs – only the template with {} placeholders is translated:

MessageContext.sendMessage("Das Formular wurde erzeugt und im Laufwerk abgelegt."); // vor v4.2025.15 MessageContext.sendMessage("org.nuclet.handel.pdf-created-and-stored", "Das Formular wurde erzeugt und im Laufwerk abgelegt.", /*no-title*/null, Locale.GERMAN); // ab v4.2025.15
Codeblock
languagejava

Related pages

globe with meridians Localization


Overview.

Öffnen Open

gear Rule sets


Rules.

Öffnen Open

electric plug Supporting classes


Rule API.

Öffnen Open