[opencms-dev] Problem with starting OpenCms and core change locale JVM

Deiverson Silveira deiverson at solutioncms.com
Thu May 17 20:35:22 CEST 2012


Solution again, hack in CmsLocaleManager:

        Locale oldLocale = Locale.getDefault();
        Locale loc = new Locale("pt","BR");
            // default language is not English
            try {
                Locale.setDefault(loc);
                if (CmsLog.INIT.isInfoEnabled()) {
                    CmsLog.INIT.info(Messages.get().getBundle().key(
                        Messages.INIT_I18N_DEFAULT_LOCALE_2,
                        loc,
                        loc));
                }
            } catch (Exception e) {
                // any Exception: the locale has not been changed, so there
may be issues with the English
                // localization but OpenCms will run in general
                CmsLog.INIT.error(
                    Messages.get().getBundle().key(
                        Messages.LOG_UNABLE_TO_SET_DEFAULT_LOCALE_2,
                        loc,
                        loc),
                    e);
            }

        // initialize the static member with the new default
        m_defaultLocale = Locale.getDefault();
    }

2012/5/17 Deiverson Silveira <deiverson at solutioncms.com>

> Some problem, again, in 8.0.3:
> http://lists.opencms.org/pipermail/opencms-dev/2009q4/033178.html
>
> omg... =/... I have hack in CmsLocaleManage.java?
>
>
> 2012/5/17 Deiverson Silveira <deiverson at solutioncms.com>
>
>> Hi,
>>
>> I Have big problem, the portal in OpenCms 8.0.3 change locale JVM for
>> "en", I don't understand if class core, but my server app with 30
>> application have problem because getlocale JVM.
>>
>> How can set in OpenCms dont change locale JVM ?
>>
>> Regards,
>>
>> Deiverson
>>
>> --
>> *
>>  www.solutioncms.com
>>  The Brazilian
>> Official Provider OpenCms
>>
>> *
>>
>
>
>
> --
> *
> www.solutioncms.com
>  The Brazilian
> Official Provider OpenCms
>
> *
>



-- 
*
www.solutioncms.com
The Brazilian
Official Provider OpenCms

*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120517/bb7fb221/attachment.htm>


More information about the opencms-dev mailing list