Interface TranslationFailureHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Decides how Lokalized should respond when a localized string lookup fails after the configured TranslationFallbackPolicy stops fallback or all locale candidates are exhausted.

Failures from evaluating a reachable expression-fragment predicate or interpolating its selected/default fragment are reported as TranslationFailureReason.RESOLUTION_FAILURE. The default fallback policy stops on these failures, while TranslationFallbackPolicy.fallbackOnAnyFailure() may try another locale before invoking this handler. An expression-selected fragment always has a default translation, so its selection cannot itself produce TranslationFailureReason.NO_MATCHING_ALTERNATIVE.

Handlers shared by a Strings instance may be invoked concurrently and must be thread-safe.

Since:
3.0.0
Author:
Mark Allen