code: public void set(Language language) {
          this.language = language;
  
          Cookie cookie = new Cookie(COOKIE_NAME, language.name());
          cookie.setPath("/");
          cookie.setMaxAge(Integer.MAX_VALUE);
          VaadinService.getCurrentResponse().addCookie(cookie);
      }
docs: Saves the new selected language in this session bean and in a cookie for future use
  
  @param language the new selected language