ILocalizationProvider Interface

Provides an interface for retrieving localized strings for relative date formatting.

public interface ILocalizationProvider

Remarks

Implement this interface to provide custom localization for RelativeDate. The default implementation uses embedded resource files for Dutch, English, French, German, Italian, Japanese, Korean, Portuguese, Simplified Chinese, Spanish and Turkish translations.

Methods

NameDescription
GetString(string, CultureInfo?)Gets a localized string for the specified resource name and culture.

GetString(string, CultureInfo?)

Gets a localized string for the specified resource name and culture.

string GetString(string name, CultureInfo? culture)

Parameters

name string
The name of the resource string (e.g., "Now", "OneSecondAgo", "InManyDays").
culture CultureInfo?
The culture for which to retrieve the localized string. If null, the current culture is used.

Returns

string The localized string, or an empty string if the resource is not found.