SemanticKernelResources Class
- java.
lang. Object - com.
microsoft. semantickernel. localization. SemanticKernelResources
- com.
public class SemanticKernelResources
Provides access to the resources used by the Semantic Kernel.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| SemanticKernelResources() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static java.lang.String |
getString(String id)
Get the string for the specified id from the resource bundle. |
| static java.lang.String |
localize(String id, String defaultValue)
Get the string for the specified id from the resource bundle. |
| static java.util.Locale |
setLocale(Locale locale)
Set the locale for the Semantic Kernel. |
| static java.util.ResourceBundle |
setResourceBundle(Locale locale)
Load the localized resource bundle for the Semantic Kernel. |
Methods inherited from java.lang.Object
Constructor Details
SemanticKernelResources
public SemanticKernelResources()
Method Details
getString
public static String getString(String id)
Get the string for the specified id from the resource bundle.
Parameters:
Returns:
localize
public static String localize(String id, String defaultValue)
Get the string for the specified id from the resource bundle.
Parameters:
Returns:
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:
Returns:
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:
Returns: