export class MessagesService {

	private static messages: {} = {}


	public static setMessages(translations: {}): void {
		MessagesService.messages = translations
	}

	public static getMessage(id: string, defaultMessage: string = ""): string {
		if ( MessagesService.messages[id] === undefined) {
			return defaultMessage
		}

		return MessagesService.messages[id]
	}
}
