EnUsTranslate Method (RelativeTime, Int32, Boolean, Boolean) |
Localize
RelativeTime. This is meant to emulate how MomentJs allows localization of RelativeTime
Namespace: MomentSharp.Globalization.LanguagesAssembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public string Translate(
RelativeTime relativeTime,
int number,
bool showSuffix,
bool isFuture
)
Public Function Translate (
relativeTime As RelativeTime,
number As Integer,
showSuffix As Boolean,
isFuture As Boolean
) As String
public:
virtual String^ Translate(
RelativeTime relativeTime,
int number,
bool showSuffix,
bool isFuture
) sealed
abstract Translate :
relativeTime : RelativeTime *
number : int *
showSuffix : bool *
isFuture : bool -> string
override Translate :
relativeTime : RelativeTime *
number : int *
showSuffix : bool *
isFuture : bool -> string
Parameters
- relativeTime
- Type: MomentSharp.GlobalizationRelativeTime
RelativeTime - number
- Type: SystemInt32
Difference amount - showSuffix
- Type: SystemBoolean
Should suffix? e.g. "ago" - isFuture
- Type: SystemBoolean
Difference is in the future or not. e.g. Yesterday vs Tomorrow
Return Value
Type:
StringLocalized realtive time e.g.: 5 seconds ago
Implements
ILocalizeTranslate(RelativeTime, Int32, Boolean, Boolean)See Also