Class T9nDictionaryParser

java.lang.Object
colesico.framework.pebble.internal.T9nDictionaryParser
All Implemented Interfaces:
com.mitchellbosecke.pebble.tokenParser.TokenParser

public final class T9nDictionaryParser
extends java.lang.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
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String DEFAULT_DICT_NAME  
  • Constructor Summary

    Constructors 
    Constructor Description
    T9nDictionaryParser​(colesico.framework.translation.TranslationKit translationKit)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getTag()  
    com.mitchellbosecke.pebble.node.RenderableNode parse​(com.mitchellbosecke.pebble.lexer.Token token, com.mitchellbosecke.pebble.parser.Parser parser)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • T9nDictionaryParser

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

    • getTag

      public java.lang.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