Enum Class TranslationExporter

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

public enum TranslationExporter extends Enum<TranslationExporter>
The supported translation export formats. Each constant pairs a user-facing format with the TranslationWriter that serializes it; callers export by selecting a constant and invoking write(TranslationPackage, OutputStream), e.g. TranslationExporter.XLSX.write(pkg, out).

descriptionKey() and extensions() expose presentation metadata (a localization key for the format's display name and its file extensions) for callers that build file choosers; this enum intentionally holds no UI types itself.

  • Enum Constant Details

    • ZIP

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

      public static final TranslationExporter XLSX
      A single Excel workbook with one worksheet per locale, plus a notes worksheet.
  • Method Details

    • values

      public static TranslationExporter[] 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 TranslationExporter 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
    • write

      public void write(TranslationPackage translationPackage, OutputStream outputStream) throws IOException
      Serializes the given package to the stream in this format.
      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.