Class ResourceBundleService

java.lang.Object
com.dlsc.formsfx.model.util.TranslationService
com.dlsc.formsfx.model.util.ResourceBundleService

public class ResourceBundleService
extends TranslationService
The ResourceBundleService is a concrete implementation of a TranslationService and uses ResourceBundles to perform translations.
Author:
Sacha Schmid, Rinesch Murugathas
  • Constructor Details

  • Method Details

    • changeLocale

      public void changeLocale​(ResourceBundle newValue)
      Change the resource bundle to use for this service. Notifies all listeners of the locale change.
      Parameters:
      newValue - The new resource bundle to use for translations.
    • translate

      public String translate​(String key)
      Looks up a key in the translation service and returns the translate string.
      Specified by:
      translate in class TranslationService
      Parameters:
      key - The key to use for the lookup.
      Returns:
      The translated string.