Class TrStringTask
Assembly: Glitch9.AIDevKit.Sheets.dll
Syntax
public class TrStringTask : TrTask<TrStringTask, string>
Constructors
|
Edit this page
View Source
TrStringTask(string, string)
Declaration
public TrStringTask(string key, string table)
Parameters
Methods
|
Edit this page
View Source
Abbr()
Declaration
public TrStringTask Abbr()
Returns
|
Edit this page
View Source
BuildFinalKey(string)
Declaration
protected override string BuildFinalKey(string table)
Parameters
| Type |
Name |
Description |
| string |
table |
|
Returns
Overrides
|
Edit this page
View Source
C(int)
Sets the pluralization count for the localized string.
Shorthand for Count(int).
Declaration
public TrStringTask C(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
Pluralization count (e.g., 3 => "3 apples").
|
Returns
|
Edit this page
View Source
Count(int)
Pluralization count for the localized string.
(e.g, 3 => "3 apples")
Declaration
public TrStringTask Count(int count)
Parameters
| Type |
Name |
Description |
| int |
count |
Pluralization count.
|
Returns
| Type |
Description |
| TrStringTask |
The fluent localization asset.
|
|
Edit this page
View Source
Enum<TEnum>(TEnum)
Declaration
public static TrStringTask Enum<TEnum>(TEnum @enum) where TEnum : struct, Enum
Parameters
| Type |
Name |
Description |
| TEnum |
enum |
|
Returns
Type Parameters
|
Edit this page
View Source
F()
Declaration
Returns
|
Edit this page
View Source
Sets additional format arguments for SmartFormat or string interpolation.
(e.g., "Hello, {0}! You have {1} apples.")
Declaration
public TrStringTask Format(params string[] args)
Parameters
| Type |
Name |
Description |
| string[] |
args |
An array of format arguments.
|
Returns
| Type |
Description |
| TrStringTask |
The fluent localization asset.
|
|
Edit this page
View Source
Gender(TextGender)
Specifies the grammatical gender for localization.
Useful for languages that use gendered forms (e.g., amigo/amiga).
Declaration
public TrStringTask Gender(TextGender gender)
Parameters
| Type |
Name |
Description |
| TextGender |
gender |
The grammatical gender to use.
|
Returns
| Type |
Description |
| TrStringTask |
The fluent localization asset.
|
|
Edit this page
View Source
Long()
Declaration
public TrStringTask Long()
Returns
|
Edit this page
View Source
M()
Declaration
Returns
|
Edit this page
View Source
N()
Declaration
Returns
|
Edit this page
View Source
ProcessValue(string)
Declaration
protected override string ProcessValue(string raw)
Parameters
| Type |
Name |
Description |
| string |
raw |
|
Returns
Overrides
|
Edit this page
View Source
Short()
Declaration
public TrStringTask Short()
Returns
|
Edit this page
View Source
TextFormat(TextFormat)
Specifies the text format (e.g., Abbreviated, Short, Long).
Useful for date/time, unit, or label formatting.
Declaration
public TrStringTask TextFormat(TextFormat format)
Parameters
| Type |
Name |
Description |
| TextFormat |
format |
The desired text format.
|
Returns
| Type |
Description |
| TrStringTask |
The fluent localization asset.
|
|
Edit this page
View Source
TryGetValue(string, string, out string)
Declaration
protected override bool TryGetValue(string table, string key, out string value)
Parameters
Returns
Overrides
|
Edit this page
View Source
ValidateValue(string)
Declaration
protected override bool ValidateValue(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
Overrides
Operators
|
Edit this page
View Source
implicit operator string(TrStringTask)
Implicitly converts a TrStringTask to a string by retrieving its localized value.
Declaration
public static implicit operator string(TrStringTask task)
Parameters
| Type |
Name |
Description |
| TrStringTask |
task |
The TrStringTask to convert.
|
Returns
Extension Methods