Class T9nDictionaryParser

java.lang.Object
colesico.framework.pebble.internal.T9nDictionaryParser
All Implemented Interfaces:
io.pebbletemplates.pebble.tokenParser.TokenParser

public final class T9nDictionaryParser extends Object implements io.pebbletemplates.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:
  • Field Details

  • Constructor Details

    • T9nDictionaryParser

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

    • getTag

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

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