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

dps.webapplication.i18n.CurrentLocale Maven / Gradle / Ivy

There is a newer version: 1.2.5
Show newest version
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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy