Class ResxLocalizationManager
- Namespace
- Discord.Interactions
- Assembly
- Discord.Net.Interactions.dll
The default localization provider for Resx files.
public sealed class ResxLocalizationManager : ILocalizationManager
- Inheritance
-
ResxLocalizationManager
- Implements
- Inherited Members
Constructors
ResxLocalizationManager(string, Assembly, params CultureInfo[])
Initializes a new instance of the ResxLocalizationManager class.
public ResxLocalizationManager(string baseResource, Assembly assembly, params CultureInfo[] supportedLocales)
Parameters
baseResource
stringName of the base resource.
assembly
AssemblyThe main assembly for the resources.
supportedLocales
CultureInfo[]Cultures the ResxLocalizationManager should search for.
Methods
GetAllDescriptions(IList<string>, LocalizationTarget)
Get every the resource description for every available locale.
public IDictionary<string, string> GetAllDescriptions(IList<string> key, LocalizationTarget destinationType)
Parameters
key
IList<string>Location of the resource.
destinationType
LocalizationTargetType of the resource.
Returns
- 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.
public IDictionary<string, string> GetAllNames(IList<string> key, LocalizationTarget destinationType)
Parameters
key
IList<string>Location of the resource.
destinationType
LocalizationTargetType of the resource.
Returns
- IDictionary<string, string>
A dictionary containing every available locale and the resource name.