Cas Default language

347 views
Skip to first unread message

john adz

unread,
Feb 17, 2019, 5:37:02 AM2/17/19
to cas-...@apereo.org
Hi,

cas i want to change default language. default file. But I want the default of messages_uk.properties file. locale = uk comes when I do, but I don't want to do that. I changed the contents of the messages.properties file and copied the contents of the messages_uk.properties file there. But he still comes in English.

thanks,

Andy Ng

unread,
Feb 17, 2019, 8:20:55 PM2/17/19
to CAS Community
Hi John,

Try this:

# cas.locale.defaultValue=en

See if this works.

- Andy

john adz

unread,
Feb 18, 2019, 2:25:36 AM2/18/19
to cas-...@apereo.org
Hi,

I added the following lines in application.properties.
Unfortunately, it did not happen. He doesn't see the change here. It comes in English.

cas.locale.paramName=locale

cas.locale.defaultValue=uk




Thanks,
--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/0585cd90-ed4c-4b07-9ce4-33473ff0b079%40apereo.org.

Andy Ng

unread,
Feb 18, 2019, 4:44:23 AM2/18/19
to CAS Community
Looking at the source code here: https://github.com/apereo/cas/blob/v5.3.7/webapp/cas-server-webapp-config/src/main/java/org/apereo/cas/config/CasWebAppConfiguration.java#L63

The locale also affected by Cookie, maybe try using an Chrome Incognito or similar browser, so that your previous cookie is not stored?

- Andy

john adz

unread,
Feb 19, 2019, 2:28:03 AM2/19/19
to CAS Community
Hi,

I'm trying with Chrome incognito. I write what I wrote in application.properties, but still in English. Do I delete the messages.properties file and see the messages_uk.properties file? Do I have to make a change elsewhere?

Thanks,

Charafeddine Youssef

unread,
Feb 19, 2019, 4:53:32 AM2/19/19
to cas-...@apereo.org
Hi john,

By default CAS use the keys in message.properties. If you want to use any language in particular, you should write your key message in messages_uk.properties.

Charaf

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

Colin Wilkinson

unread,
Feb 19, 2019, 6:58:52 PM2/19/19
to CAS Community
Hi John,

firstly there is no such locale in java as UK, the locale for UK is en_GB see Java Locale “English (United Kingdom)”.

Secondly its defined in the wrong location, you have it defined application.properties but you need to define it in cas.properties.

So try,
cas.locale.defaultValue=en_GB

you do not need to specific paramName as the default for that value is locale

Regards,
Colin
Reply all
Reply to author
Forward
0 new messages