1 package org.apache.slide.projector.i18n; 2 3 import java.util.Locale ; 4 5 public class DefaultMessage extends LocalizedMessage { 6 private final static String TITLE = "title"; 7 private final static String TEXT = "text"; 8 9 public DefaultMessage(String messageId) { 10 super(messageId); 11 } 12 13 public DefaultMessage(String messageId, Object [] arguments) { 14 super(messageId, arguments); 15 } 16 17 public String getTitle(Locale locale) throws MessageNotFoundException { 18 return getText(TITLE, locale); 19 } 20 21 public String getTitle(Locale locale, String defaultTitle) { 22 return getText(TITLE, defaultTitle, locale); 23 } 24 25 public String getText(Locale locale) throws MessageNotFoundException { 26 return getText(TEXT, locale); 27 } 28 29 public String getText(Locale locale, String defaultText) { 30 return getText(TEXT, defaultText, locale); 31 } 32 } 33 | Popular Tags |