ILocalizeTranslate Method (RelativeTime, Int32, Boolean, Boolean) |
Localize
RelativeTime. This is meant to emulate how MomentJs allows localization of RelativeTime
Namespace: MomentSharp.GlobalizationAssembly: MomentSharp (in MomentSharp.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax string Translate(
RelativeTime relativeTime,
int number,
bool showSuffix,
bool isFuture
)
Function Translate (
relativeTime As RelativeTime,
number As Integer,
showSuffix As Boolean,
isFuture As Boolean
) As String
String^ Translate(
RelativeTime relativeTime,
int number,
bool showSuffix,
bool isFuture
)
abstract 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
See Also