Jahia DX > Get the current...

0 (0 Good)
0 (0 Bad)

Get the current locale in my portlet doesn't work.

by  rvt »  2011/06/07 18:02

Hello,

I have made a portlet and trying to get the current locale within my portlet.

The code I am using is: Locale locale = renderRequest.getLocale();

My website is created in two languages (de_DE and en_US) and my portlet.xml file does contain:

<supported-locale>en_US</supported-locale>
<supported-locale>de_DE</supported-locale>

However, when I change the language within Jahia using the language flags, the locale of my portlet stays to en_US.

The version of Jahia I am using is : r36767

Currently I assume it's a bug, but may be I missed something?

Ries

  • Get the current locale in my portlet doesn't work.
    2011/07/04 08:28

    rvt <p> Hello,<br /> <br /> I have made a portlet and trying to get the current locale within my portlet.<br /> <br /> The code I am using is: Locale locale = renderRequest.getLocale();<br /> <br /> My website is created in two languages (de_DE and en_US) and my portlet.xml file does contain:<br /> <br /> &lt;supported-locale&gt;en_US&lt;/supported-locale&gt;<br /> &lt;supported-locale&gt;de_DE&lt;/supported-locale&gt;<br /> <br /> However, when I change the language within Jahia using the language flags, the locale of my portlet stays to en_US.<br /> <br /> The version of Jahia I am using is : r36767<br /> <br /> Currently I assume it&#39;s a bug, but may be I missed something?<br /> <br /> Ries</p>

  • Number of messages  185
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Get the current locale in my portlet doesn't work.

    by  shuber »  2011/06/07 18:02

    Actually I think this is not supported by the current implementation, so I would indeed recommend creating a bug issue in our issue tracker available here : http://jira.jahia.org/secure/Dashboard.jspa

    Regards,
    Serge Huber

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re: Get the current locale in my portlet doesn't work.

    by  rvt »  2011/06/07 18:02

    Serge,

    thanks for the quick respond.
    I created a ticket here : http://jira.jahia.org/browse/JAHIA-5121

    Ries
  • Re: Get the current locale in my portlet doesn't work.
    2011/06/07 18:02

    rvt Serge,<br/><br/>thanks for the quick respond.<br/>I created a ticket here : <!-- m --><a class="postlink" href="http://jira.jahia.org/browse/JAHIA-5121">http://jira.jahia.org/browse/JAHIA-5121</a><!-- m --><br/><br/>Ries

  • Number of messages  185
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Get the current locale in my portlet doesn't work.

    by  shuber »  2011/06/07 18:02

    Hello Ries,

    Thank you, I have informed QA about this ticket.

    Regards,
    Serge Huber.

    Serge Huber (shuber)

    Number of messages  271
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page