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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic TranslationExporterReturns the enum constant of this class with the specified name.static TranslationExporter[]values()Returns an array containing the constants of this enum class, in the order they are declared.voidwrite(TranslationPackage translationPackage, OutputStream outputStream) Serializes the given package to the stream in this format.
-
Enum Constant Details
-
ZIP
A zip archive of per-locale JSON files plus a manifest and notes file. -
XLSX
A single Excel workbook with one worksheet per locale, plus a notes worksheet.
-
-
Method Details
-
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
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 nameNullPointerException- 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
- Returns:
- the localization key for this format's human-readable display name.
-
extensions
-