Enum Class TranslationImporter

java.lang.Object
java.lang.Enum<TranslationImporter>
com.inductiveautomation.ignition.common.i18n.translation.io.TranslationImporter
All Implemented Interfaces:
Serializable, Comparable<TranslationImporter>, Constable

public enum TranslationImporter extends Enum<TranslationImporter>
The supported translation import formats. Each constant pairs a user-facing format with the TranslationReader that parses it; callers import by selecting a constant and invoking read(Path), e.g. TranslationImporter.XLSX.read(path).

The format is always chosen explicitly by the caller — nothing is inferred from file contents. ZIP and XLSX read the modern formats produced by TranslationExporter; LEGACY reads the older loose .properties/.xml layout, which the caller bundles into a zip before reading.

descriptionKey() and extensions() expose presentation metadata for callers that build file choosers; this enum intentionally holds no UI types itself. For LEGACY, the extensions describe the loose files the user selects, not the zip wrapper.

  • Enum Constant Details

    • ZIP

      public static final TranslationImporter ZIP
      A zip archive of per-locale JSON files plus a manifest and notes file.
    • XLSX

      public static final TranslationImporter XLSX
      A single Excel workbook with one worksheet per locale, plus a notes worksheet.
    • LEGACY

      @Deprecated(since="2027.2.0", forRemoval=true) public static final TranslationImporter LEGACY
      Deprecated, for removal: This API element is subject to removal in a future version.
      This format is included in 2027.2 for backwards compatibility, but will be removed in 2028.2
      Legacy loose .properties/.xml files, pre-bundled into a zip by the caller.
  • Method Details

    • values

      public static TranslationImporter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TranslationImporter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • read

      public TranslationPackage read(Path inputPath) throws IOException
      Parses the file at the given path into a translation package.
      Throws:
      IOException
    • descriptionKey

      public String descriptionKey()
      Returns:
      the localization key for this format's human-readable display name.
    • extensions

      public List<String> extensions()
      Returns:
      the file extensions (without leading dots) associated with this format.