56 private fun selectLanguage(http: HttpRequest, dao: DataAccessObject) { |
56 private fun selectLanguage(http: HttpRequest, dao: DataAccessObject) { |
57 val lang = http.param("language") |
57 val lang = http.param("language") |
58 if (lang != null) { |
58 if (lang != null) { |
59 val locale = Locale.forLanguageTag(lang) |
59 val locale = Locale.forLanguageTag(lang) |
60 if (!locale.language.isNullOrBlank()) { |
60 if (!locale.language.isNullOrBlank()) { |
61 http.response.locale = locale |
61 super.selectLanguage(http, locale) |
62 http.session.setAttribute(Constants.SESSION_ATTR_LANGUAGE, locale) |
|
63 } |
62 } |
64 } |
63 } |
65 |
64 |
66 viewLanguages(http, dao) |
65 viewLanguages(http, dao) |
67 } |
66 } |