1 package org.tigris.scarab.tools.localization; 2 3 import org.tigris.scarab.tools.ScarabLocalizationTool; 4 5 6 51 52 59 public final class L10NKey implements LocalizationKey, Localizable 60 { 61 62 63 67 private final String key; 68 69 74 public String toString() 75 { 76 return key; 77 } 78 79 84 public L10NKey(String theKey) 85 { 86 key = theKey; 87 } 88 89 93 public String getMessage() 94 { 95 ScarabLocalizationTool l10n = new ScarabLocalizationTool(); 96 l10n.init(ScarabLocalizationTool.DEFAULT_LOCALE); 97 return getMessage(l10n); 98 } 99 100 104 public String getMessage(ScarabLocalizationTool l10n) 105 { 106 return l10n.get(this); 107 } 108 109 } 110 | Popular Tags |