掲示板
Hook for Post Login Locale
9年前 に Fakhruddin S Mushki によって更新されました。
Hook for Post Login Locale
Junior Member 投稿: 78 参加年月日: 13/04/10 最新の投稿
Dears,
I am using Liferay 6.2 bundled with JBoss 7.
Below is my issue:
There are three locales configured in my site. English, Arabic and Kurdish. When I log in to my portal then post login, the portal opens up in user default language and doesn't remain on the language where it was before login.
Eg. If Portal opens up in English and when I log in using user whose default display language is Arabic then post login in , the site goes to Arabic. Where else I dont want this feature. I want it to be on the same language where it was before i.e English.
Please let me know if it is not clear.
I need to a hook for it. please guide.
I am using Liferay 6.2 bundled with JBoss 7.
Below is my issue:
There are three locales configured in my site. English, Arabic and Kurdish. When I log in to my portal then post login, the portal opens up in user default language and doesn't remain on the language where it was before login.
Eg. If Portal opens up in English and when I log in using user whose default display language is Arabic then post login in , the site goes to Arabic. Where else I dont want this feature. I want it to be on the same language where it was before i.e English.
Please let me know if it is not clear.
I need to a hook for it. please guide.
9年前 に Sandip Patel によって更新されました。
RE: Hook for Post Login Locale
Regular Member 投稿: 205 参加年月日: 11/01/05 最新の投稿
Yuo are saying " then post login in , the site goes to Arabic".
So Have you use any redirection after login ?
are you displaying information based on user's default data languange ?
So Have you use any redirection after login ?
are you displaying information based on user's default data languange ?
9年前 に Tejas Kanani によって更新されました。
RE: Hook for Post Login Locale (回答)
Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
Hi,
Some time ago, I've wrote one hook(Browser Language Hook) for Liferay 6.1 which does the same thing. That hook will pick the locale from browser and set the same for logged in user. So upon user login it will get the locale currently selected for browser and set the same as logged in user's locale. So here it's totally depends upon the language selected in browser.
I'm not quite sure about if in 6.2, we have any other option available OOTB. If not, probably you can also write the similar hook for 6.2.
Also check below property available in portal.properties of LR 6.2 if it's somewhat helpful.
HTH !
- Tejas
Some time ago, I've wrote one hook(Browser Language Hook) for Liferay 6.1 which does the same thing. That hook will pick the locale from browser and set the same for logged in user. So upon user login it will get the locale currently selected for browser and set the same as logged in user's locale. So here it's totally depends upon the language selected in browser.
I'm not quite sure about if in 6.2, we have any other option available OOTB. If not, probably you can also write the similar hook for 6.2.
Also check below property available in portal.properties of LR 6.2 if it's somewhat helpful.
Set this to true if unauthenticated users get their preferred language from the Accept-Language header. Set this to false if unauthenticated users get their preferred language from their company.
Defaults:
locale.default.request=false
HTH !
- Tejas