AW: Wrong fallback language
Sobotka Martin
martin.sobotka at inet-logistics.com
Wed May 31 05:21:50 EDT 2017
>>> I also believe that Spring should fall back to the "bare" file, in
>>> other projects I use the same technology and the behavior is like
>>> that. Where can I turn the logging for this to "debug"? I tried the following:
>>
>> I have no idea what categories would be involved, you'd have to experiment.
>>
>> My guess offhand is that your methods are getting mixed. If a cookie were still set then it would get used even if you specified a bad value in the header or URL. Are you sure a totally clean browser doesn't fall back to the bare file?
>
> Every time I test, my browser is clear. The value of URL parameter "Lang" will be stored in the cookie "locale" with correct value.
> Now I've a bare messages file and one for every supported language: en, zh, de. The bare message file will never taken.
Problem solved!
Spring fallback is by default the system language - in my case German.
I modified the bean "messageSource" at "system/conf/global-system.xml" :
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"
p:cacheSeconds="%{idp.message.cacheSeconds:300}"
p:basenames-ref="#{'%{idp.message.resources:shibboleth.MessageSourceResources}'.trim()}"
p:fallbackToSystemLocale="%{idp.message.fallbackToSystemLocale:false}"
p:defaultEncoding="UTF-8" />
At "idp.properties" I added the property "idp.message.fallbackToSystemLocale".
Best Regards,
Martin
More information about the users
mailing list