Package com.inductiveautomation.ignition.common.i18n.translation
Core types
TranslationPackage— the read interface andMutableTranslationPackagewhich adds the edit operations.BasicTranslationPackage— the standard mutable implementation, vsImmutableTranslationPackagethe read-only snapshot.
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.
-
ClassDescriptionA translation package implementation that manages an index of keys and multiple
TranslationBundleobjects for different locales.A record that pairs an original source key with its computed hash based on aKeyHashRule.An immutable, thread-safe implementation ofTranslationPackage.GSON adapter that serializes in the same wire format asBasicTranslationPackagefor backwards compatibility with existing clients.Defines the normalization rules for creating a search key from a source key.A container for a single translated key.This class contains translated keys for a specific locale.A map of Locales to translated strings for a specific key.A translation package holds the keys and one or more translations for the keys.A specialized translation package that tracks added, modified, and removed keys and translations.Settings that define how translations are handled, including normalization rules like ignoring whitespace or punctuation.