/** * Sets the current locale. This method actually resets the language * conveyor in order to use the new locale. It's quite simple. * @param locale The new locale for localized messages through the language * conveyor. */ public void setLocale(Locale locale) { conveyor = new MessageConveyor(locale); }
/** * @return Message conveyor for English messages. */ @Produces @SuppressWarnings(CompilerWarnings.STATIC_METHOD) public IMessageConveyor messages() { return new MessageConveyor(Locale.ENGLISH); }
/** * Private constructor. The fallback language is set to English for all * messages in arara. */ private LanguageController() { conveyor = new MessageConveyor(new Locale("en")); }
/** * Instantiates a new localizer helper passing a locale. * * @param locale * the locale */ public LocalizerHelper(Locale locale) { mc = new MessageConveyor(locale); locLoggerFactory = new LocLoggerFactory(mc); }
@Override protected void configure() { bind(IMessageConveyor.class).toInstance(new MessageConveyor(Locale.ENGLISH)); }
public static void main(String[] args) throws JoranException { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); context.reset(); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); joranConfigurator.doConfigure("src/test/java/ch/qos/logback/classic/issue/DarioCampagna/logback-marker.xml"); IMessageConveyor mc = new MessageConveyor(Locale.getDefault()); LocLoggerFactory llFactory_default = new LocLoggerFactory(mc); LocLogger locLogger = llFactory_default.getLocLogger("defaultLocLogger"); Marker alwaysMarker = MarkerFactory.getMarker("ALWAYS"); locLogger.info(alwaysMarker, "This will always appear."); locLogger.info("Hello!"); } }