LocalizationHelperGetString(CultureInfo, String, LocalizationContext, Object) Method
Gets a localized string for the specified
key using the specified
formattingCulture,
context and formatting arguments.
It invokes the
LocalizationRequested event to retrieve the string resource format. If the event is not handled,
and a resource set is available for the specified context, it retrieves the string from that resource set.
Namespace: KGySoft.WinFormsAssembly: KGySoft.WinForms (in KGySoft.WinForms.dll) Version: 5.0.1
public static string? GetString(
CultureInfo? formattingCulture,
string key,
LocalizationContext? context,
params Object?[]? args
)
Public Shared Function GetString (
formattingCulture As CultureInfo,
key As String,
context As LocalizationContext,
ParamArray args As Object()
) As String
public:
static String^ GetString(
CultureInfo^ formattingCulture,
String^ key,
LocalizationContext^ context,
... array<Object^>^ args
)
static member GetString :
formattingCulture : CultureInfo *
key : string *
context : LocalizationContext *
args : Object[] -> string
- formattingCulture CultureInfo
- The culture to use for formatting the string resource. If , the current thread's culture is used.
- key String
- The key of the requested string resource. When args has values, the key is expected to be a format string.
- context LocalizationContext
- The localization context to use for the operation. If , no context is used.
- args Object
- The formatting arguments to be applied to the localized string format.
StringThe localized and formatted string for the specified
key if found; otherwise,
.