package rs.etf;

import java.util.Locale;
import java.util.Map;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean; 
import javax.faces.context.FacesContext;

@ManagedBean // or @Named
@ApplicationScoped
public class LocaleChanger {
   public void changeLocale(String izmenaJezika) {
    FacesContext context = FacesContext.getCurrentInstance();
    context.getViewRoot().setLocale(new Locale(izmenaJezika));
   }
}