Class AutoLocalizationSettings
Contains specialized settings for auto-localization of tokens.
Inheritance
Inherited Members
Namespace: Sdl.LanguagePlatform.Core.Tokenization
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public class AutoLocalizationSettings
Constructors
AutoLocalizationSettings()
Declaration
public AutoLocalizationSettings()
Properties
CurrencyDecimalSeparator
If not null, specifies the decimal separator to use when formatting currency
Declaration
public string CurrencyDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CurrencyGroupSeparator
If not null, specifies the group separator to use when formatting currency
Declaration
public string CurrencyGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
CurrencySymbolPosition
If not null, specifies the position in which to place the currency symbol when formatting currency
Declaration
public CurrencySymbolPosition? CurrencySymbolPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<CurrencySymbolPosition> |
DisableAutoSubstitution
Gets or sets the a set of recognizers for which auto-substitution will be disabled. Note that whether or not auto-localizable tokens are identified depends on the active recognizers. That is, if number recognition is off, then disabling auto-substitution of numbers has no effect as no numbers will be identified in the input.
The default is to disable none of the auto-substitutable token classes.
Declaration
public BuiltinRecognizers DisableAutoSubstitution { get; set; }
Property Value
Type | Description |
---|---|
BuiltinRecognizers |
FormatCurrencyPositionUniformly
If true, CurrencySymbolPosition will be used for TM matches, rather than the position in the match target being used instead for auto-substitution.
Declaration
public bool FormatCurrencyPositionUniformly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FormatCurrencySeparatorsUniformly
If true, currency separators in AutoLocalizationSettings will be used for TM matches, rather than separators in the match target being used instead for auto-substitution.
Declaration
public bool FormatCurrencySeparatorsUniformly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FormatDateTimeUniformly
If true, date/time patterns in AutoLocalizationSettings will be used for TM matches, rather than the format in the match target being used instead for auto-substitution.
Declaration
public bool FormatDateTimeUniformly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FormatNumberSeparatorsUniformly
If true, number separators in AutoLocalizationSettings will be used for TM matches, rather than the separators in the match target being used instead for auto-substitution.
Declaration
public bool FormatNumberSeparatorsUniformly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalizationParametersSource
Gets or sets the localization parameter source, which controls which tokens are used to obtain the actual localization parameters, such as the numeric group separator override, or whitespace handling between a number and the unit in measurements.
Declaration
public LocalizationParametersSource LocalizationParametersSource { get; set; }
Property Value
Type | Description |
---|---|
LocalizationParametersSource |
LongDatePattern
Gets or sets the long date pattern for the auto-localization into the target language. This pattern must be one of the patterns defined by the target culture. Otherwise, placeable association will not work correctly. If the value is null, a default pattern will be used.
Declaration
public string LongDatePattern { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LongTimePattern
Gets or sets the long time pattern for the auto-localization into the target language. This pattern must be one of the patterns defined by the target culture. Otherwise, placeable association will not work correctly. If the value is null, a default pattern will be used.
Declaration
public string LongTimePattern { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NumberDecimalSeparator
If not null, specifies the decimal separator to use when formatting numbers
Declaration
public string NumberDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
NumberGroupSeparator
If not null, specifies the group separator to use when formatting numbers
Declaration
public string NumberGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShortDatePattern
Gets or sets the short date pattern for the auto-localization into the target language. This pattern must be one of the patterns defined by the target culture. Otherwise, placeable association will not work correctly. If the value is null, a default pattern will be used.
Declaration
public string ShortDatePattern { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ShortTimePattern
Gets or sets the short time pattern for the auto-localization into the target language. This pattern must be one of the patterns defined by the target culture. Otherwise, placeable association will not work correctly. If the value is null, a default pattern will be used.
Declaration
public string ShortTimePattern { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UnitSeparationMode
Gets or sets the unit separation mode, which controls how units are separated from the numeric value in measurements.
Declaration
public UnitSeparationMode UnitSeparationMode { get; set; }
Property Value
Type | Description |
---|---|
UnitSeparationMode |
UnitSeparator
Gets or sets the unit separator char, which must be a whitespace char or the null character (\0).
Declaration
public char UnitSeparator { get; set; }
Property Value
Type | Description |
---|---|
System.Char |
Methods
AttemptAutoSubstitution(Token)
Returns a flag whether or not to attempt auto-substitution on the specified token. The value depends on the token type and whether auto-substitution is enabled for that token type or not (see DisableAutoSubstitution.
Declaration
public bool AttemptAutoSubstitution(Token t)
Parameters
Type | Name | Description |
---|---|---|
Token | t | The token |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value whether or not to attempt auto-substitution for this token. |