Class BundleLookupThreadContext

java.lang.Object
com.aoapps.hodgepodge.i18n.BundleLookupThreadContext

public final class BundleLookupThreadContext extends Object

Each thread has a markup context associated with it. When set, bundle lookups will be recorded with any markup-context appropriate prefixes and suffixes added. This allows the use of a normal API while providing a mechanism for in-context translation interfaces to better integrate with the underlying resource bundles.

Under concurrent programming, one context can end up being accessed concurrently by multiple threads, thus BundleLookupThreadContext is a thread-safe implementation.

Bundle lookups are not guaranteed to be recorded, such as when in-context translation is disabled (production mode).