package edu.wgu.d387_sample_code.Messages;

import java.util.Locale;
import java.util.ResourceBundle;

public class WelcomeMessage implements Runnable {
    private Locale locale;

    public WelcomeMessage (Locale locale){
        this.locale = locale;
    }

    public String getWelcomeMessage(){
        ResourceBundle bundle = ResourceBundle.getBundle("messages", locale);
        return bundle.getString("welcomeMessage");
    }

    @Override
    public void run(){
        System.out.println(getWelcomeMessage());
    }
}
