dps.webapplication.i18n.CurrentLocale Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dps.webapplication Show documentation
Show all versions of dps.webapplication Show documentation
Common classes for webapplications
package dps.webapplication.i18n;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
@Named("CurrentLocale")
@RequestScoped
public class CurrentLocale extends AbstractLocale {
@Inject
DefaultLocale defaultLocale;
@Inject
SessionLocale sessionLocale;
@Override
AbstractLocale getParentLocale() {
return sessionLocale;
}
public boolean isDefault() {
return defaultLocale.getLocale() == this.getLocale();
}
@Override
public void setLocale(String languageTag) {
super.setLocale(languageTag);
}
}