<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Change the User Language Programatically</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119711385" />
  <subtitle>Change the User Language Programatically</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119711385</id>
  <updated>2026-05-14T03:08:58Z</updated>
  <dc:date>2026-05-14T03:08:58Z</dc:date>
  <entry>
    <title>RE: Change the User Language Programatically</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119719127" />
    <author>
      <name>krishna patel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119719127</id>
    <updated>2020-08-07T06:29:53Z</updated>
    <published>2020-08-07T06:29:53Z</published>
    <summary type="html">Hi Syed Ali,&lt;br /&gt;Try to update cookie as well,&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;session.setAttribute(WebKeys.LOCALE, locale);&lt;br /&gt;LanguageUtil.updateCookie(request, response, locale);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If you are trying to update language for signed user and want to persist that language for future then also update it in user profile. Please find reference here https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/action/UpdateLanguageAction.java line 87.</summary>
    <dc:creator>krishna patel</dc:creator>
    <dc:date>2020-08-07T06:29:53Z</dc:date>
  </entry>
  <entry>
    <title>Change the User Language Programatically</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119711384" />
    <author>
      <name>Syed Ali</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119711384</id>
    <updated>2020-08-05T13:27:27Z</updated>
    <published>2020-08-05T13:27:27Z</published>
    <summary type="html">Hi Guys,Please let me know how can i change the User Language  Programatically in Portlet controller, in Liferay 7.2.&lt;br /&gt;I tried with the below code snippet but its not working in Liferay 7.2, &lt;br /&gt;session.setAttribute(&amp;#34;org.apache.struts.action.LOCALE&amp;#34;, locale);</summary>
    <dc:creator>Syed Ali</dc:creator>
    <dc:date>2020-08-05T13:27:27Z</dc:date>
  </entry>
</feed>
