public.javadoc.org.spincast.plugins.localeresolver.SpincastLocaleResolver.html Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of spincast-website Show documentation
                Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
                
            
SpincastLocaleResolver (org.spincast:spincast-framework 0.9.21 API) 
org.spincast.plugins.localeresolver
Class SpincastLocaleResolver
- java.lang.Object
 
- 
- org.spincast.plugins.localeresolver.SpincastLocaleResolver
 
 
- 
- All Implemented Interfaces:
 
- ILocaleResolver
 
public class SpincastLocaleResolver
extends Object
implements ILocaleResolver
 
- 
- 
Constructor Summary
Constructors  
Constructor and Description 
 
SpincastLocaleResolver(ISpincastConfig spincastConfig,
                      com.google.inject.Provider<IRequestContext<?>> requestContextProvider)  
 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods  
Modifier and Type 
Method and Description 
 
Locale 
getLocaleToUse()
The default way to find the Locale to use is to check for
 a cookie, or otherwise use the request "Accept-Language" header.
 
 
protected com.google.inject.Provider<IRequestContext<?>> 
getRequestContextProvider()  
 
protected ISpincastConfig 
getSpincastConfig()  
 
 
 
- 
- 
Constructor Detail
- 
SpincastLocaleResolver
@Inject
public SpincastLocaleResolver(ISpincastConfig spincastConfig,
                                       com.google.inject.Provider<IRequestContext<?>> requestContextProvider)
 
 
- 
Method Detail
- 
getSpincastConfig
protected ISpincastConfig getSpincastConfig()
 
- 
getRequestContextProvider
protected com.google.inject.Provider<IRequestContext<?>> getRequestContextProvider()
 
- 
getLocaleToUse
public Locale getLocaleToUse()
The default way to find the Locale to use is to check for
 a cookie, or otherwise use the request "Accept-Language" header.
- Specified by:
 
getLocaleToUse in interface ILocaleResolver 
- Returns:
 
- The best Locale to use. If none is found, returns
 the default Locale, as defined by 
ISpincastConfig#getDefaultLocale() 
 
 
 
Copyright © 2016. All rights reserved.
    © 2015 - 2025 Weber Informatics LLC | Privacy Policy