package org.nl.acs.opc;

import org.apache.commons.lang3.StringUtils;
import org.nl.config.SpringContextHolder;
import org.springframework.context.MessageSource;
import org.springframework.context.i18n.LocaleContextHolder;


public class LangProcess {

    public static String msg(String code,String...args){
        MessageSource bean = SpringContextHolder.getBean(MessageSource.class);
        if (StringUtils.isEmpty(code)){
            return " ";
        }
        String message = bean.getMessage(code, args, LocaleContextHolder.getLocale());
        return message;
    }
}
