Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pl.matisoft.soy.locale;
 
 
Created with IntelliJ IDEA. User: mati Date: 20/06/2013 Time: 00:08 An implementation of LocaleProvider that uses user's browser Accept-Header setting resolving a preferred locale based on browser configuration.
public class AcceptHeaderLocaleProvider implements LocaleProvider {
    public Optional<LocaleresolveLocale(final HttpServletRequest request) {
        return Optional.fromNullable(request.getLocale());
    }
New to GrepCode? Check out our FAQ X