Class JsonLocalizationManager
The default localization provider for Json resource files.
Implements
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public sealed class JsonLocalizationManager : object, ILocalizationManager
Constructors
| Improve this Doc View SourceJsonLocalizationManager(String, String)
Initializes a new instance of the JsonLocalizationManager class.
Declaration
public JsonLocalizationManager(string basePath, string fileName)
Parameters
Type | Name | Description |
---|---|---|
String | basePath | Base path of the Json file. |
String | fileName | Name of the Json file. |
Methods
| Improve this Doc View SourceGetAllDescriptions(IList<String>, LocalizationTarget)
Get every the resource description for every available locale.
Declaration
public IDictionary<string, string> GetAllDescriptions(IList<string> key, LocalizationTarget destinationType)
Parameters
Type | Name | Description |
---|---|---|
IList<String> | key | Location of the resource. |
LocalizationTarget | destinationType | Type of the resource. |
Returns
Type | Description |
---|---|
IDictionary<String, String> | A dictionary containing every available locale and the resource name. |
GetAllNames(IList<String>, LocalizationTarget)
Get every the resource name for every available locale.
Declaration
public IDictionary<string, string> GetAllNames(IList<string> key, LocalizationTarget destinationType)
Parameters
Type | Name | Description |
---|---|---|
IList<String> | key | Location of the resource. |
LocalizationTarget | destinationType | Type of the resource. |
Returns
Type | Description |
---|---|
IDictionary<String, String> | A dictionary containing every available locale and the resource name. |