Class T9nDictionaryParser

  • All Implemented Interfaces:
    com.mitchellbosecke.pebble.tokenParser.TokenParser

    public final class T9nDictionaryParser
    extends Object
    implements com.mitchellbosecke.pebble.tokenParser.TokenParser
    Translation dictionary loader.

    Loads dictionary to template scoped variable. Loaded dictionary my be used by t9n filter. Usage examples:

    {% t9nDictionary "dictionary/base/path" %} - loads dictionary to 'messages' variable {% t9nDictionary "dictionary/base/path" "myName" %} - loads dictionary to 'myName' variable

    Author:
    Vladlen Larionov
    See Also:
    T9nFilter
    • Constructor Detail

      • T9nDictionaryParser

        public T9nDictionaryParser​(colesico.framework.translation.TranslationKit translationKit)
    • Method Detail

      • getTag

        public String getTag()
        Specified by:
        getTag in interface com.mitchellbosecke.pebble.tokenParser.TokenParser
      • parse

        public com.mitchellbosecke.pebble.node.RenderableNode parse​(com.mitchellbosecke.pebble.lexer.Token token,
                                                                    com.mitchellbosecke.pebble.parser.Parser parser)
                                                             throws com.mitchellbosecke.pebble.error.ParserException
        Specified by:
        parse in interface com.mitchellbosecke.pebble.tokenParser.TokenParser
        Throws:
        com.mitchellbosecke.pebble.error.ParserException