All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bidib.wizard.utils.XmlLocaleUtils Maven / Gradle / Ivy

There is a newer version: 2.0.0-M1
Show newest version
package org.bidib.wizard.utils;

import java.util.Locale;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class XmlLocaleUtils {
    private static final Logger LOGGER = LoggerFactory.getLogger(XmlLocaleUtils.class);

    public static final String DEFAULT_LOCALE = "en-EN";

    public static String getXmlLocale() {
        Locale locale = Locale.getDefault();
        LOGGER.trace("Current locale: {}", locale);

        String xmlLocale = null;
        xmlLocale = locale.getLanguage();
        if (xmlLocale.equals("de")) {
            xmlLocale = "de-DE";
        }
        else {
            xmlLocale = "en-EN";
        }
        return xmlLocale;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy