Class SemanticKernelResources


  • public class SemanticKernelResources
    extends Object
    Provides access to the resources used by the Semantic Kernel.
    • Constructor Detail

      • SemanticKernelResources

        public SemanticKernelResources()
    • Method Detail

      • setResourceBundle

        public static ResourceBundle setResourceBundle​(Locale locale)
        Load the localized resource bundle for the Semantic Kernel. If there is no resource bundle for the specified locale, the default resource bundle will be loaded.
        Parameters:
        locale - The locale to use.
        Returns:
        the resource bundle.
      • setLocale

        public static Locale setLocale​(Locale locale)
        Set the locale for the Semantic Kernel. As a side effect, the localized resource bundle will be loaded.
        Parameters:
        locale - The locale to use.
        Returns:
        the locale.
      • localize

        public static String localize​(String id,
                                      String defaultValue)
        Get the string for the specified id from the resource bundle.
        Parameters:
        id - The id of the string.
        defaultValue - The default value to return if the string is not found.
        Returns:
        the localized string, or the default value if the string is not found.
      • getString

        public static String getString​(String id)
        Get the string for the specified id from the resource bundle.
        Parameters:
        id - The id of the string.
        Returns:
        the localized string, or the id if the string is not found.