Share via


StringLocalizerExtensions.GetString Method

Definition

Overloads

GetString(IStringLocalizer, String)

Gets the string resource with the given name.

GetString(IStringLocalizer, String, Object[])

Gets the string resource with the given name and formatted with the supplied arguments.

GetString(IStringLocalizer, String)

Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs

Gets the string resource with the given name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Localization::LocalizedString ^ GetString(Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer, System::String ^ name);
public static Microsoft.Extensions.Localization.LocalizedString GetString (this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name);
static member GetString : Microsoft.Extensions.Localization.IStringLocalizer * string -> Microsoft.Extensions.Localization.LocalizedString
<Extension()>
Public Function GetString (stringLocalizer As IStringLocalizer, name As String) As LocalizedString

Parameters

stringLocalizer
IStringLocalizer

The IStringLocalizer.

name
String

The name of the string resource.

Returns

The string resource as a LocalizedString.

Applies to

GetString(IStringLocalizer, String, Object[])

Source:
StringLocalizerExtensions.cs
Source:
StringLocalizerExtensions.cs

Gets the string resource with the given name and formatted with the supplied arguments.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Localization::LocalizedString ^ GetString(Microsoft::Extensions::Localization::IStringLocalizer ^ stringLocalizer, System::String ^ name, ... cli::array <System::Object ^> ^ arguments);
public static Microsoft.Extensions.Localization.LocalizedString GetString (this Microsoft.Extensions.Localization.IStringLocalizer stringLocalizer, string name, params object[] arguments);
static member GetString : Microsoft.Extensions.Localization.IStringLocalizer * string * obj[] -> Microsoft.Extensions.Localization.LocalizedString
<Extension()>
Public Function GetString (stringLocalizer As IStringLocalizer, name As String, ParamArray arguments As Object()) As LocalizedString

Parameters

stringLocalizer
IStringLocalizer

The IStringLocalizer.

name
String

The name of the string resource.

arguments
Object[]

The values to format the string with.

Returns

The formatted string resource as a LocalizedString.

Applies to