private Langs langs() { return components.langs(); }
private Langs langs() { return components.langs(); }
private Langs langs() { return components.langs(); }
/** * Set the language for the current request, but don't * change the language cookie. This means the language * will be set for this request, but will not change for * future requests. * * @param lang the language to set * @throws IllegalArgumentException If the given language * is not supported by the application. * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public void setTransientLang(Lang lang) { final Langs langs = components.langs(); if (langs.availables().contains(lang)) { this.lang = lang; } else { throw new IllegalArgumentException("Language not supported in this application: " + lang + " not in " + langs.availables()); } }
/** * Set the language for the current request, but don't * change the language cookie. This means the language * will be set for this request, but will not change for * future requests. * * @param lang the language to set * @throws IllegalArgumentException If the given language * is not supported by the application. * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public void setTransientLang(Lang lang) { final Langs langs = components.langs(); if (langs.availables().contains(lang)) { this.lang = lang; } else { throw new IllegalArgumentException("Language not supported in this application: " + lang + " not in " + langs.availables()); } }
/** * Set the language for the current request, but don't * change the language cookie. This means the language * will be set for this request, but will not change for * future requests. * * @param lang the language to set * @throws IllegalArgumentException If the given language * is not supported by the application. * * @deprecated Deprecated as of 2.7.0. <a href="https://www.playframework.com/documentation/latest/JavaHttpContextMigration27">See migration guide.</a>. */ @Deprecated public void setTransientLang(Lang lang) { final Langs langs = components.langs(); if (langs.availables().contains(lang)) { this.lang = lang; } else { throw new IllegalArgumentException("Language not supported in this application: " + lang + " not in " + langs.availables()); } }