Hi everyone,
I'm using Struts 2 and am currently trying to get the default language that struts is using. What I want to do is load some images on the jsp end of the application. Because the website should be available to users in a variety of languages I need to "i18n" the jsp-pages. Therefore I'm looking for an easy way to get the default language that struts is using, because the path to the images I want to load is composed with the language acronym in it.
Short example:
Code:
<img src="/foo/bar/en_US/image_english.jpg" />
<img src="/foo/bar/de_DE/image_german.jpg" />
What I'd like to avoid is using ActionContext.getContext().getLocale() on every class to get the locale. Once the language is set via a "request_locale" link within the website it's available via the constant WW_TRANS_I18N_LOCALE, but before that I have no clue.
Thanks for any advice in advance.