class ResourceBundleUtil {

    private static final ResourceBundleUtf8Control BUNDLE_UTF_8_CONTROL = new ResourceBundleUtf8Control();
    private static final Integer LANG_REGION_LENGTH = 2;

    static {
        // set default locale by env
        try {
            String langEnv = System.getenv("LANG");
            if (langEnv != null) {
                String[] langArr = langEnv.split("\\.");
                if (langArr.length >= 1) {
                    String[] regionArr = langArr[0].split("_");
                    if (regionArr.length == LANG_REGION_LENGTH) {
                        String language = regionArr[0];
                        String region = regionArr[1];
                        Locale locale = new Locale(language, region);
                        Locale.setDefault(locale);
                    }
                }
            }
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
    }

    /**
     * get resource bundle by bundle name
     * @param bundleName bundle name
     * @return resource bundle
     */
    public static ResourceBundle getBundle(String bundleName) {<FILL_FUNCTION_BODY>}

}

        try {
            return ResourceBundle.getBundle(bundleName, BUNDLE_UTF_8_CONTROL);
        } catch (MissingResourceException resourceException) {
            return ResourceBundle.getBundle(bundleName, Locale.US, BUNDLE_UTF_8_CONTROL);
        }
    
<no_super_class>