Package com.inductiveautomation.ignition.common.i18n.translation


@NullMarked package com.inductiveautomation.ignition.common.i18n.translation
The in-memory model for the platform's user-defined translations: the set of localizable keys and the translations defined for them across locales. This package is scope-agnostic — the gateway, designer, and Vision client all share these types and exchange them as the wire model.

Core types

Keys, hashing, and equivalence

Keys are authored in Locale.ENGLISH: a key is its source-language string, so every package implicitly contains the base locale even with no stored bundle for it. Two raw keys are considered the same term when they hash to the same value under the package's KeyHashRule — a normalization rule that can ignore case, whitespace, punctuation, and HTML tags.

Lookup and fallback

get(locale, key) walks the locale lookup list (most specific to least, e.g. fr_FR then fr) and returns the raw key text when nothing matches; getStrict resolves a single locale with no fallback and returns null when absent. Callers that want fallback-resolved values but null for genuinely-untranslated keys must walk the lookup list themselves.

Diffs

Edits are expressed as a TranslationPackageDiff obtained from TranslationPackage.createDiff() (so it inherits the source package's hash rule). A diff stages both additions and removals — keys, locales, translations, and notes — and is applied with applyPackage, which processes removals first and then merges added content.