Class DefaultApiLocalization
Represents default localization settings for an API.
Inherited Members
Namespace: Innovt.AspNetCore.Model
Assembly: Innovt.AspNetCore.dll
Syntax
public class DefaultApiLocalization
Constructors
| Edit this page View SourceDefaultApiLocalization()
Initializes a new instance of the DefaultApiLocalization class with default culture settings.
Declaration
public DefaultApiLocalization()
Properties
| Edit this page View SourceDefaultLocalizeResource
Gets or sets the type of the default localization resource.
Declaration
public Type? DefaultLocalizeResource { get; set; }
Property Value
Type | Description |
---|---|
Type |
RequestCulture
Gets or sets the request culture for the API.
Declaration
public CultureInfo RequestCulture { get; set; }
Property Value
Type | Description |
---|---|
CultureInfo |
SupportedCultures
Gets or sets the list of supported cultures for the API.
Declaration
public IList<CultureInfo>? SupportedCultures { get; }
Property Value
Type | Description |
---|---|
IList<CultureInfo> |
Methods
| Edit this page View SourceAddSupportedCulture(string)
Adds a supported culture with the specified name to the list of supported cultures.
Declaration
protected DefaultApiLocalization AddSupportedCulture(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the supported culture (e.g., "pt-br"). |
Returns
Type | Description |
---|---|
DefaultApiLocalization | The updated DefaultApiLocalization instance. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if the provided name is null. |