jetbrick-commons/src/main/java/jetbrick/lang/LocaleUtils.java
public static String resolveLocaleCode(final String lang, final String country, final String variant) {
        StringBuilder code = new StringBuilder(lang);
        if (country != null && country.length() > 0) {
            code.append('_').append(country);
            if (variant != null && variant.length() > 0) {
                code.append('_').append(variant);
            }
        }
        return code.toString();
    }
public static String resolveLocaleCode(final String lang, final String country, final String variant) {
        StringBuilder code = new StringBuilder(lang);
        if (country != null && country.length() > 0) {
            code.append('_').append(country);
            if (variant != null && variant.length() > 0) {
                code.append('_').append(variant);
            }
        }
        return code.toString();
    }
public static String resolveLocaleCode ( final String lang , final String country , final String variant ) { StringBuilder code = new StringBuilder ( lang ) ; if ( country != null && country . length ( ) > 0 ) { code . append ( ' ' ) . append ( country ) ; if ( variant != null && variant . length ( ) > 0 ) { code . append ( ' ' ) . append ( variant ) ; } } return code . toString ( ) ; }
Transforms locale data to locale code. <code>null</code> values are allowed.
Transforms locale data to locale code . <code > null< / code > values are allowed .