Hi List,<br><br>About problem with JVM,<span class="kn" dir="ltr"></span> <span dir="ltr" id=":za">I believe it is a bug in opencms, when he goes to set a locale that has more than 2 parts (fr_CA, pt_BR)</span><span dir="ltr" id=":162">, i have module pt_BR ok, but code dont reading pt_BR and set locale JVM, i change class CmsLocaleManager.java in package org.opencms.i18n:<br>
<br>/**<br>     * Sets the default locale of the Java VM to <code>{@link Locale#ENGLISH}</code> if the <br>     * current default has any other language then English set.<p><br>     *<br>     * This is required because otherwise the default (English) resource bundles <br>
     * would not be displayed for the English locale if a translated default locale exists.<p><br>     * <br>     * Here's an example of how this issues shows up:<br>     * On a German server, the default locale usually is <code>{@link Locale#GERMAN}</code>.<br>
     * All English translations for OpenCms are located in the "default" message files, for example <br>     * <code>org.opencms.i18n.message.properties</code>. If the German localization is installed, it will be<br>
     * located in <code>org.opencms.i18n.message_de.properties</code>. If user has English selected<br>     * as his locale, the default Java lookup mechanism first tries to find <br>     * <code>org.opencms.i18n.message_en.properties</code>. However, this file does not exist, since the<br>
     * English localization is kept in the default file. Next, the Java lookup mechanism tries to find the servers<br>     * default locale, which in this example is German. Since there is a German message file, the Java lookup mechanism<br>
     * is finished and uses this German localization, not the default file. Therefore the <br>     * user get the German localization, not the English one.<br>     * Setting the default locale explicitly to English avoids this issue.<p><br>
     */<br>    private static void setDefaultLocale() {<br><br>        // set the default locale to english<br>        // this is required because otherwise the default (english) resource bundles <br>        // would not be displayed for the english locale if a translated locale exists<br>
<br>        Locale oldLocale = Locale.getDefault();<br>        if (!(Locale.ENGLISH.getLanguage().equals(oldLocale.getLanguage()))) {<br>            // default language is not English<br>            try {<br>                Locale.setDefault(Locale.ENGLISH);<br>
                if (CmsLog.INIT.isInfoEnabled()) {<br>                    <a href="http://CmsLog.INIT.info">CmsLog.INIT.info</a>(Messages.get().getBundle().key(<br>                        Messages.INIT_I18N_DEFAULT_LOCALE_2,<br>
                        Locale.ENGLISH,<br>                        oldLocale));<br>                }<br>            } catch (Exception e) {<br>                // any Exception: the locale has not been changed, so there may be issues with the English<br>
                // localization but OpenCms will run in general<br>                CmsLog.INIT.error(Messages.get().getBundle().key(<br>                    Messages.LOG_UNABLE_TO_SET_DEFAULT_LOCALE_2,<br>                    Locale.ENGLISH,<br>
                    oldLocale), e);<br>            }<br>        } else {<br>            if (CmsLog.INIT.isInfoEnabled()) {<br>                <a href="http://CmsLog.INIT.info">CmsLog.INIT.info</a>(Messages.get().getBundle().key(Messages.INIT_I18N_KEEPING_DEFAULT_LOCALE_1, oldLocale));<br>
            }<br>        }<br><br>        // initialize the static member with the new default <br>        m_defaultLocale = Locale.getDefault();<br>    }<br><br><br><br><br>I change method for this and set JVM ok:<br><br>
<br><br>    private static void setDefaultLocale() {<br><br>        // set the default locale to english<br>        // this is required because otherwise the default (english) resource bundles<br>        // would not be displayed for the english locale if a translated locale exists<br>
<br>        Locale oldLocale = Locale.getDefault();<br>    Locale loc = new Locale("pt","BR");<br><br>            try {<br>            Locale.setDefault(loc);<br>                if (CmsLog.INIT.isInfoEnabled()) {<br>
                    <a href="http://CmsLog.INIT.info">CmsLog.INIT.info</a>(Messages.get().getBundle().key(<br>                        Messages.INIT_I18N_DEFAULT_LOCALE_2,<br>                        loc,<br>                        oldLocale));<br>
                }<br>            } catch (Exception e) {<br>                // any Exception: the locale has not been changed, so there may be issues with the English<br>                // localization but OpenCms will run in general<br>
                CmsLog.INIT.error(Messages.get().getBundle().key(<br>                    Messages.LOG_UNABLE_TO_SET_DEFAULT_LOCALE_2,<br>                    loc,<br>                    oldLocale), e);<br>            }<br>
<br>        // initialize the static member with the new default<br>        m_defaultLocale = Locale.getDefault();<br>    }<br><br><br>SUCESS! This Work others system/projects, opencms dont impact in jvm when pt_BR... </span><span dir="ltr" id=":za">but the jvm will be forever by setting pt_BR! </span><span dir="ltr" id=":14v">I Belive other people must have the same problem when more project in server aplication!</span>