info.magnolia.i18nsystem
Interface I18nKeyGenerator<T>

Type Parameters:
T - the type of Object this I18nKeyGenerator generates keys for.
All Known Implementing Classes:
AbstractI18nKeyGenerator, NullKeyGenerator

public interface I18nKeyGenerator<T>

An I18nKeyGenerator is responsible for deriving i18n keys for any given instance of T.

See Also:
AbstractI18nKeyGenerator

Method Summary
 String[] keysFor(String undecoratedResult, T object, AnnotatedElement el)
          Generates the possible keys for the given object's annotated element.
 String messageBundleNameFor(T object)
          If has a property that can be used to determine the bundle name (i18nBasename), return that.
 

Method Detail

keysFor

String[] keysFor(String undecoratedResult,
                 T object,
                 AnnotatedElement el)
Generates the possible keys for the given object's annotated element.

Parameters:
undecoratedResult - the value returned by the undecorated underlying method call. It is generally expected that this value will be part of the returned keys, such that an object with an explicitly configured key or label will be translated using that value rather than derived keys.
el - the element being translated - typically a Method instance.

messageBundleNameFor

String messageBundleNameFor(T object)
If has a property that can be used to determine the bundle name (i18nBasename), return that. The keys will be tried with and without it.



Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.