Package nz.org.riskscape.wizard
Interface Question.I18nLookupFunction
- Enclosing class:
- Question
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for returning translated strings for a question.
-
Method Summary
-
Method Details
-
apply
Lookup a string for a question. No
MessageSource
argument is given - it is expected that the function will 'close over' one to use as a source of translations.- Parameters:
question
- the question that needs a translationsuffix
- some discriminator that identifies the kind of text we're looking up,e.g.title
ordescription
- it is expected that this gets used to build a key when doing an i18n, but it could also be used in a case statement (I guess?)locale
- the locale that the user is in- Returns:
- a translated string, or null if nothing is present.
-