- java.lang.Object
-
- colesico.framework.pebble.internal.T9nFilter
-
- All Implemented Interfaces:
com.mitchellbosecke.pebble.extension.Filter,com.mitchellbosecke.pebble.extension.NamedArguments
public final class T9nFilter extends Object implements com.mitchellbosecke.pebble.extension.Filter
This filter perform string translation by previously loaded dictionary (with t9nDictionary tag)Filter usage example: {{ "myStringKey" | t9n }} - for dictionary name 'messages' {{ "myStringKey" | t9n(myName) }} - for dictionary name 'myName' {{ "myStringKey" | t9n([param1, param2]) }} - for dictionary name 'messages' {{ "myStringKey" | t9n(myName,[param1, param2]) }} - for dictionary name 'myName'
- Author:
- Vladlen Larionov
- See Also:
T9nDictionaryParser
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILTER_NAME
-
Constructor Summary
Constructors Constructor Description T9nFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectapply(Object input, Map<String,Object> args, com.mitchellbosecke.pebble.template.PebbleTemplate pebbleTemplate, com.mitchellbosecke.pebble.template.EvaluationContext evaluationContext, int lineNumber)List<String>getArgumentNames()
-
-
-
Field Detail
-
FILTER_NAME
public static final String FILTER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getArgumentNames
public List<String> getArgumentNames()
- Specified by:
getArgumentNamesin interfacecom.mitchellbosecke.pebble.extension.NamedArguments
-
apply
public Object apply(Object input, Map<String,Object> args, com.mitchellbosecke.pebble.template.PebbleTemplate pebbleTemplate, com.mitchellbosecke.pebble.template.EvaluationContext evaluationContext, int lineNumber) throws com.mitchellbosecke.pebble.error.PebbleException
- Specified by:
applyin interfacecom.mitchellbosecke.pebble.extension.Filter- Throws:
com.mitchellbosecke.pebble.error.PebbleException
-
-