package org.dicadeveloper.weplantaforest.messages;
import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Component;
@Component
public class MessageByLocaleServiceImpl implements MessageByLocaleService {
@Autowired
private MessageSource messageSource;
@Override
public String getMessage(String id, Locale locale) {
return messageSource.getMessage(id,null,locale);
}
}