/** * {@inheritDoc} */ @Override public void onClick() { if (null != locale) { getSession().setLocale(locale); } }
@Override public void setObject(final Locale object) { getSession().setLocale(object); }
/** * {@inheritDoc} */ @Override public void onSubmit() { if (locale != null) { getSession().setLocale(locale); } }
/** * {@inheritDoc} */ @Override public void onClick() { if (null != locale) { getSession().setLocale(locale); } }
/** * {@inheritDoc} */ @Override public void onSubmit() { if (locale != null) { getSession().setLocale(locale); } }
@Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale("pt", "BR")); return session; }
@Override public Session newSession(Request request, Response response) { Session session = super.newSession(request, response); session.setLocale(new Locale("pt", "BR")); return session; }
/** * Sets the session locale and reload the current page. * @param locale session locale * @param target Ajax target */ public static void setSessionLocale( Locale locale, AjaxRequestTarget target) { Session.get().setLocale(locale); if (target != null) { target.appendJavaScript("window.location.reload();"); } }
@Override public Session newSession(Request request, Response response) { Session s = new GeoServerSession(request); if (s.getLocale() == null) s.setLocale(Locale.ENGLISH); return s; }
@Override public Session newSession(Request request, Response response) { Session s = new GeoServerSession(request); if (s.getLocale() == null) s.setLocale(Locale.ENGLISH); return s; }
protected void onUpdate(AjaxRequestTarget target) { // Store locale in cookie setCookieValue(LOCALE_COOKIE, selectedLocale, LOCALE_COOKIE_MAXAGE); // and update the session locale getSession().setLocale(getSelectedLocale()); // redraw labels, feedback panel and provided components labels.stream().filter(Component::isVisible).forEach(target::add); target.add(feedback); if (handler != null) { handler.localeChanged(selectedLocale, target); } } });
@SuppressWarnings({ "serial" }) private void commonInit() getSession().setLocale(Locale.ENGLISH);
public void testLocaleEN() { Session.get().setLocale(Locale.ENGLISH); tester.clickLink(WicketPath.IMPORT_LINK.path); this.assertPage(org.geoserver.web.importer.StoreChooserPage.class); tester.assertContains("Import data"); }
public void testLocaleIT() { Session.get().setLocale(Locale.ITALY); tester.clickLink(WicketPath.IMPORT_LINK.path); this.assertPage(org.geoserver.web.importer.StoreChooserPage.class); tester.assertContains("Importazione dei dati"); }
default: getSession().setLocale(Locale.forLanguageTag(locale)); break;
default: getSession().setLocale(Locale.forLanguageTag(locale)); break;
default: getSession().setLocale(Locale.forLanguageTag(locale)); break;
getSession().setLocale(getSelectedLocale());