ResourceBundleLocalizedString (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.template, class: ResourceBundleLocalizedString

Package freemarker.template

# Class ResourceBundleLocalizedString

java.lang.Object
freemarker.template.LocalizedString
freemarker.template.ResourceBundleLocalizedString

All Implemented Interfaces:
  `TemplateModel`, `TemplateScalarModel`

public class ResourceBundleLocalizedString extends LocalizedString
A concrete implementation of `LocalizedString` that gets a localized string from a `ResourceBundle`

- ## Field Summary

  ### Fields inherited from interface freemarker.template.TemplateModel

  `NOTHING`

  ### Fields inherited from interface freemarker.template.TemplateScalarModel

  `EMPTY_STRING`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceBundleLocalizedString​(String resourceBundleLookupKey, String resourceKey)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getLocalizedString​(Locale locale)`

  ### Methods inherited from class freemarker.template.LocalizedString

  `getAsString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ResourceBundleLocalizedString

    public ResourceBundleLocalizedString​(String resourceBundleLookupKey, String resourceKey)
    Parameters:
      `resourceBundleLookupKey` - The lookup key for the resource bundle
      `resourceKey` - the specific resource (assumed to be a string) to fish out of the resource bundle

- ## Method Details

  - ### getLocalizedString

    public String getLocalizedString​(Locale locale) throws TemplateModelException
    Specified by:
      `getLocalizedString` in class `LocalizedString`
    Throws:
      `TemplateModelException`