<?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>[CLOSED] MVC portlet development: how to internazionalize?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=109129256" />
  <subtitle>[CLOSED] MVC portlet development: how to internazionalize?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=109129256</id>
  <updated>2026-04-04T08:15:16Z</updated>
  <dc:date>2026-04-04T08:15:16Z</dc:date>
  <entry>
    <title>RE: MVC portlet development: how to internazionalize?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110896382" />
    <author>
      <name>Mirto Silvio Busico</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110896382</id>
    <updated>2018-09-06T12:45:30Z</updated>
    <published>2018-09-06T12:45:30Z</published>
    <summary type="html">&lt;p&gt;Well,&lt;/p&gt;
&lt;p&gt;I was able to solve the aui frontend problems.&lt;/p&gt;
&lt;p&gt;Now I close this thread and open a new one on write/read localized content.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</summary>
    <dc:creator>Mirto Silvio Busico</dc:creator>
    <dc:date>2018-09-06T12:45:30Z</dc:date>
  </entry>
  <entry>
    <title>RE: MVC portlet development: how to internazionalize?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110851884" />
    <author>
      <name>Mirto Silvio Busico</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110851884</id>
    <updated>2018-08-31T13:07:44Z</updated>
    <published>2018-08-31T13:07:44Z</published>
    <summary type="html">&lt;p&gt;Hi Andrew,&lt;/p&gt;
&lt;p&gt;after a long time working on other issues I returned to this one.&lt;/p&gt;
&lt;p&gt;Now I'm using Liferay 7.1 CE GA 1.&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;edit_foo.jsp&lt;/strong&gt; I have&lt;/p&gt;
&lt;pre&gt;
&amp;lt;aui:input name=&amp;quot;field5&amp;quot; localized=&amp;quot;&amp;lt;%= true %&amp;gt;&amp;quot;/&amp;gt;&lt;/pre&gt;
&lt;p&gt;And in the interface I see the flag switch and the 2 translation I
  entered (see screenshot 1)&lt;/p&gt;
&lt;p&gt;In &lt;strong&gt;MsbOnePortlet.java&lt;/strong&gt; I have&lt;/p&gt;
&lt;pre&gt;
String[] field5Values = ParamUtil.getStringValues(actionRequest, &amp;quot;field5&amp;quot;, null);&lt;/pre&gt;
&lt;p&gt;But when I debug the code (see screenshot 2) only the string value of
  the active language flag:&lt;/p&gt;
&lt;pre&gt;
it rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr&lt;/pre&gt;
&lt;p&gt;Instead I expected to receive couples of stings to convert to map. I mean&lt;/p&gt;
&lt;pre&gt;
&amp;quot;it_IT&amp;quot;, &amp;quot;it rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr&amp;quot;, &amp;quot;EN_US&amp;quot;, &amp;quot;en qqqqqqqqqqqqqqqqq&amp;quot;&lt;/pre&gt;
&lt;p&gt;What I'm missing?&lt;/p&gt;</summary>
    <dc:creator>Mirto Silvio Busico</dc:creator>
    <dc:date>2018-08-31T13:07:44Z</dc:date>
  </entry>
  <entry>
    <title>RE: MVC portlet development: how to internazionalize?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109195761" />
    <author>
      <name>Mirto Silvio Busico</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109195761</id>
    <updated>2018-05-31T08:03:41Z</updated>
    <published>2018-05-31T08:03:41Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi Andrew, thanks (again) &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"&gt;&lt;br&gt;&lt;br&gt;I'm trying your suggestions&lt;br&gt;&lt;br&gt;&lt;strong&gt;First progress:&lt;/strong&gt;&lt;br&gt;I discovered how multilingual content is stored.&lt;br&gt;Using a Basic Web Content (journalarticle) when you edit an article you have a button to create a new translation (here I'm using English and Italian)&lt;br&gt;After the action that creates an Italian translation the multilanguage fields content is transformed in XML (example for description field)&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;!--?xml version='1.0' encoding='UTF-8'?--&amp;gt;
&amp;lt;root available-locales="en_US,it_IT," default-locale="en_US"&amp;gt;
&amp;lt;description language-id="it_IT"&amp;gt;prova multilingua&amp;lt;/description&amp;gt;
&amp;lt;description language-id="en_US"&amp;gt;multilingual test&amp;lt;/description&amp;gt;
&amp;lt;/root&amp;gt;&lt;/code&gt;&lt;/pre&gt; &lt;br&gt;Instead in my test field (the field "name" in the guestbook demo application) there is only standard text.&lt;br&gt;&lt;br&gt;I'm investigating about the create translation function.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mirto Silvio Busico</dc:creator>
    <dc:date>2018-05-31T08:03:41Z</dc:date>
  </entry>
  <entry>
    <title>RE: MVC portlet development: how to internazionalize?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109150168" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109150168</id>
    <updated>2018-05-30T15:42:19Z</updated>
    <published>2018-05-30T15:42:19Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi (again) Mirto &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"&gt;&lt;br&gt;&lt;br&gt;I'll try to help out on this one as well. You can leverage some of the aui input tag lib to help you out here. In your view (jsp?) you can use the aui input with an attribute that will render the flags for the languages that are available (configured) for you instance. &lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;aui:input name="sample" localized="&amp;lt;%= true %&amp;gt;" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;The post of the different values Liferay will actually handle for you which is great. On the back side you can use the ParamUtil to get the list of values. I am going from memory here but I think you get an array with &amp;lt;locale&amp;gt;=&amp;lt;value&amp;gt; like this --&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;String[] sampleValues = ParamUtil.getStringValues(actionRequest, "sample", null);&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;I think at this stage you can convert it to a Map using the MapUtil class &lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;Map&amp;lt;locale, string&amp;gt; sampleMap = MapUtil.fromArray(sampleValues);&amp;lt;/locale,&amp;gt;&lt;/code&gt;&lt;/pre&gt; &lt;br&gt;&lt;br&gt;... or something like that. Now that you have your map, you can call your service with the Map as a parameter and you should be good to go.&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2018-05-30T15:42:19Z</dc:date>
  </entry>
  <entry>
    <title>[CLOSED] MVC portlet development: how to internazionalize?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109129255" />
    <author>
      <name>Mirto Silvio Busico</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=109129255</id>
    <updated>2018-05-30T12:13:34Z</updated>
    <published>2018-05-30T12:13:34Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi all, there is any example/documentation about developing a MVC portlet that manage multilingual content? For now, the only thing I know is that I have to put &lt;strong&gt;localized=true&lt;/strong&gt; in&lt;strong&gt; service.xml&lt;/strong&gt; file &lt;pre&gt;&lt;code&gt;&amp;lt;column localized="true" name="myColumn" type="String"&amp;gt;&amp;lt;/column&amp;gt;&lt;/code&gt;&lt;/pre&gt; and use service builder to generate a persistence layer that manage different languages at the column level. I posted also a &lt;a href="https://web.liferay.com/community/forums/-/message_boards/message/109063498"&gt;Liferay Documentation&lt;/a&gt; thread AAny hint?&amp;lt;/column&amp;gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Mirto Silvio Busico</dc:creator>
    <dc:date>2018-05-30T12:13:34Z</dc:date>
  </entry>
</feed>
