1
如何檢測瀏覽器的語言,並根據該值自動顯示正確的本地化版本的Grails網站。
瀏覽器自動檢測語言
我把這個給Index操作
Locale locale = new Locale(params.lang)
cookieLocaleResolver.setLocale(request, response, (Locale)
session.getAttribute('locale'))
{
render controller: "home", action: "index"
return
}
而且我得到了exception--
Error 500: Executing action [index] of controller [socialworking.HomeController] caused exception: null
Servlet: grails
URI: /socialworking/grails/home.dispatch
Exception Message:
Caused by:
Class: Unknown