info.magnolia.i18nsystem
Class SimpleTranslator

java.lang.Object
  extended by info.magnolia.i18nsystem.SimpleTranslator

public class SimpleTranslator
extends Object

A convenience component around TranslationService and LocaleProvider for getting messages based on a single, well-known, key. It also allows formatting of parameters into messages using the MessageFormat format.

See Also:
MessageFormat

Constructor Summary
SimpleTranslator(TranslationService translationService, LocaleProvider localeProvider)
           
 
Method Summary
 String translate(String key, Object... args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTranslator

@Inject
public SimpleTranslator(TranslationService translationService,
                               LocaleProvider localeProvider)
Method Detail

translate

public String translate(String key,
                        Object... args)


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