goja-core/src/main/java/goja/core/kits/lang/LocaleKit.java
public static String resolveLocaleCode(String lang, String country, String variant) {
        StringBuilder code = new StringBuilder(lang);
        if (!StringUtils.isEmpty(country)) {
            code.append('_').append(country);
            if (!StringUtils.isEmpty(variant)) {
                code.append('_').append(variant);
            }
        }
        return code.toString();
    }
public static String resolveLocaleCode(String lang, String country, String variant) {
        StringBuilder code = new StringBuilder(lang);
        if (!StringUtils.isEmpty(country)) {
            code.append('_').append(country);
            if (!StringUtils.isEmpty(variant)) {
                code.append('_').append(variant);
            }
        }
        return code.toString();
    }
public static String resolveLocaleCode ( String lang , String country , String variant ) { StringBuilder code = new StringBuilder ( lang ) ; if ( ! StringUtils . isEmpty ( country ) ) { code . append ( ' ' ) . append ( country ) ; if ( ! StringUtils . isEmpty ( variant ) ) { 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 .