0

getting error while adding new locale in liferay 6.2

  • Asked - Feb 21, 2014, 08:11 PM
    / Viewed 38999 Times
    Hi

    I am trying to add new local in liferay 6.2 ie locales like es_US en_NL as these locales are not in liferay's available locale list for that I followed following steps .
    - added the locale list in liferay portal-ext.properties file in locales property ie
    locales=en_NL,es_US
    -Then restarted the server..
    - the added locales are now showing in available locale list ..ie from controlpanel->display settings
    -Then i moved the available locales to current locale list using liferays control panel.
    -but when i clicked on save button I am getting the current locale is not valid.

    Am I missing something here..How can I configure these locales ie locales ie not available in available locale list.

    Thanks

    2 Answers

    1
    Answered - Feb 25, 2014, 10:19 PM
    (Edited)
    Hello

    You need to add custom locale to web.xml in Liferay webapps (ROOT)

    <servlet-mapping>
    <servlet-name>I18n Servlet</servlet-name>
    <url-pattern>/en_NL/*</url-pattern>
    </servlet-mapping>

    Richard
    0
    Answered - Feb 22, 2014, 07:08 PM
    (Edited)
    Hi Sachin,

    can you see anything in the log file?

    Regards,
    Zsigmond
    Replied - Feb 24, 2014, 06:12 AM
    (Edited)
    Hi Zsigmond,

    I am getting the following messages after clicking on save button

    "Your request failed to complete."

    "Please enter a valid locale."

    There is no logs on console.
    Replied - Feb 24, 2014, 10:18 AM
    (Edited)
    Sachin,

    Looks like issue is with number of Languages you are selecting from Display Settings. As after adding only 2 locales(en_NL,es_US) from portal-ext.properties, when you go to Control Panel -> Display Settings, it's displaying around 10+ languages in Current. So after adding English(Netherlands) to current and save it's trying to validate all the languages including "English(Netherlands)" with the locales= values provided in portal-ext.properties.

    And when it tries to validate language other than the one you've provided in portal-ext.properties it will give error.
    What you can do here is,
    - First remove all the entries from Current back to Available
    - Add only "English(Netherlands)" to Current one
    - Save

    It should resolve your issue.

    Thanks,
    Tejas Kanani
    Replied - Mar 17, 2014, 07:04 AM
    (Edited)
    Thanks Tejas. It helped.
    Replied - Apr 3, 2014, 06:44 AM
    (Edited)
    Thanks Tejas,
    It worked...emoticon
    Replied - May 19, 2020, 07:31 PM
    (Edited)
    <p>Hi Tejas,</p>

    <p>&nbsp;</p>

    <p>i am using 7.2 liferay version ,&nbsp; in that i am unable to remove languages from &quot;Current &quot; beacause&nbsp; the default&nbsp; set langauge is english, even though i tried to removed default language from portal-setup-wizard properties file, but still default its showing , kindly guide me how to achieve this</p>