All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vertigo.ui.impl.springmvc.config.VertigoLocaleResolver Maven / Gradle / Ivy

There is a newer version: 4.2.0
Show newest version
package io.vertigo.ui.impl.springmvc.config;

import java.util.Locale;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.LocaleResolver;

import io.vertigo.core.locale.LocaleManager;
import io.vertigo.core.node.Node;

public class VertigoLocaleResolver implements LocaleResolver {

	@Override
	public Locale resolveLocale(final HttpServletRequest request) {
		return Node.getNode().getComponentSpace().resolve(LocaleManager.class).getCurrentLocale();
	}

	@Override
	public void setLocale(final HttpServletRequest request, final HttpServletResponse response, final Locale locale) {
		// the locale is not set this way. Generally via the Vertigo UserSession Object dedicated to the project
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy