Class WoolTranslationParser


  • public class WoolTranslationParser
    extends Object
    This class can parse a WOOL translation file. The file should contain a JSON object with key-value pairs as exported by POEditor. There are two types of key-value pairs:

    • Key and value are strings. The key is a translatable in one language, and the value is a translatable in another language. A translatable should be the string representation of a WoolTranslatable. That is a text that may include variables and <<input>> commands.
    • The key is a string the value is a JSON object. In this case the key is a context string, and the value contains translatable key-value pairs.

    This parser ignores context strings and returns a flat map of translatables. This means that it does not support different translations of the same string with different contexts.