Forum Discussion
On this page, there is a url param that supposedly changes the profile language, though I haven't so far been able to get it to work on the sites I tested.
https://community.khoros.com/t5/Community-display/Languages-that-Khoros-Communities-support/ta-p/6566
- Add ?profile.language=KEY as a parameter to any URL in your community (where KEY is the language code listed on the page above).
Would you give this a shot on your community to see if it works?
Hi IanKl ,
That's actually what we are doing today. It mostly works but I want to get away from it. That parameter breaks some things (like, the rank editor) and figuring out all the places where it's not proper is challenging and difficult to debug a url that's rewritten in flight. That's why I want to switch to some other way to signal a language preference to us and then we pull the logic down into init so we have more control over it.
So definitely looking for the "And then set the language via modifying the user setting through the API. I'll find the link for you tomorrow. "
Thanks for your help!
Mark
- IanKl2 years agoKhoros Alumni (Retired)
Anytime.
You can also use a combination of testing browser.location values vs user profile values vs IP locations vs request language vs cookies in a custom component which then assigns the user's profile.language setting.You might find this and some of the other Freemarker Context Object http methods helpful:
https://developer.khoros.com/khoroscommunitydevdocs/reference/requestlang
and https://developer.khoros.com/khoroscommunitydevdocs/reference/headersnamegetheader_name-default_value + https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
and others in those headings.
Related Content
- 9 days ago
- 13 years ago
- 10 years ago