Class LocalizedString

java.lang.Object
freemarker.template.LocalizedString
All Implemented Interfaces:
TemplateModel, TemplateScalarModel
Direct Known Subclasses:
ResourceBundleLocalizedString

public abstract class LocalizedString extends Object implements TemplateScalarModel
An abstract base class for scalars that vary by locale. Here is a silly usage example. TemplateScalarModel localizedYes = new LocalizedString() { public String getLocalizedString(java.util.Locale locale) { String lang = locale.getLanguage(); if "fr".equals(lang) return "oui"; else if "de".equals(lang) return "sí"; else return "yes"; } };