Examples of LocaleProvider


Examples of org.jayasoft.woj.portal.utils.LocaleProvider

  private static final String MAIL_INVITATION_CONFIRMATION = "invitation_confirmation";
    private static final String MAIL_ENTERPRISE_LICENSE_INFO = "enterprise_license_info";
   
    public MailFactory(TemplateEngine te) {
        _templateEngine = te;
        LocaleProvider lp = LocaleProvider.WOJ_LOCALE_PROVIDER;
        _bundle = MultiResourceBundle.bundle("org.jayasoft.woj.portal.business.services.mail.MailTemplates", lp.getLocale());
        ((MultiResourceBundle)_bundle).setLocaleProvider(lp);
       
//        Properties usedTemplates = new Properties();
//        try {
//            TemplateFactory tf = _templateEngine.getFactory();
View Full Code Here

Examples of org.jvnet.localizer.LocaleProvider

    public void contextInitialized(ServletContextEvent event) {
        try {
            final ServletContext context = event.getServletContext();

            // use the current request to determine the language
            LocaleProvider.setProvider(new LocaleProvider() {
                public Locale get() {
                    return Functions.getCurrentLocale();
                }
            });
View Full Code Here

Examples of org.jvnet.localizer.LocaleProvider

        super(name);
    }
   
    // @Bug(6824)
    public void testLocalizationOfStatus() throws Exception {
        LocaleProvider old = LocaleProvider.getProvider();
        try {
            final AtomicReference<Locale> locale = new AtomicReference<Locale>();
            LocaleProvider.setProvider(new LocaleProvider() {
                public @Override Locale get() {
                    return locale.get();
                }
            });
            locale.set(Locale.GERMANY);
View Full Code Here

Examples of org.jvnet.localizer.LocaleProvider

            catch (IllegalStateException e) {
                // strategy already set ignore
            }

            // use the current request to determine the language
            LocaleProvider.setProvider(new LocaleProvider() {
                public Locale get() {
                    Locale locale=null;
                    StaplerRequest req = Stapler.getCurrentRequest();
                    if(req!=null)
                        locale = req.getLocale();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.