Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Selecting CSS per language/locale

Something like this in casLoginView.jsp:

Code Block
languagejava

<%
    String cssFileName = "mylogin.css"; // default
    Locale locale = request.getLocale();

    if (locale != null && StringUtils.isNotBlank(locale.getLanguage())){
       String languageCssFileName = "mylogin_" + locale.getLanguage() + ".css";
       // Maybe test here if languageCssFile exists...
       cssFileName = languageCssFileName;
    }

%>
%>

<link href="/path/to/css/files/<%=cssFileName%>" rel="stylesheet" type="text/css"/>
Warning

The above snippet is only experimental and may need to be reviewed further. Use at your own risk.