diff options
Diffstat (limited to 'eaaf_core/src')
-rw-r--r-- | eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/utils/MvcGuiRenderUtils.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/utils/MvcGuiRenderUtils.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/utils/MvcGuiRenderUtils.java index 5a3f14cb..b212f140 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/utils/MvcGuiRenderUtils.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/utils/MvcGuiRenderUtils.java @@ -92,6 +92,18 @@ public class MvcGuiRenderUtils { } /** + * Get i18n information from HTTP request. + * + * @param localeResolver Resolver for localization + * @param request HTTP request + * @return Current locale + */ + public static Locale getLocaleByRequest(LocaleResolver localeResolver, @NonNull HttpServletRequest request) { + return localeResolver != null ? localeResolver.resolveLocale(request) : request.getLocale(); + + } + + /** * Render a GUI by using Spring based ModelAndView (MVC) components. * * @param mv GUI model @@ -144,11 +156,6 @@ public class MvcGuiRenderUtils { } - private static Locale getLocaleByRequest(LocaleResolver localeResolver, @NonNull HttpServletRequest request) { - return localeResolver != null ? localeResolver.resolveLocale(request) : request.getLocale(); - - } - private static View buildViewFromModel(ViewResolver[] viewResolvers, Locale locale, @NonNull ModelAndView mv) throws Exception { |