Class AutoLocalizationSettings
Contains specialized settings for auto-localization of tokens.
Inherited Members
Namespace: SdlSdl.LanguagePlatformCoreTokenization
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
[DataContract]
public class AutoLocalizationSettings
Constructors
AutoLocalizationSettings()
Declaration
public AutoLocalizationSettings()
Properties
CurrencyDecimalSeparator
If not null, specifies the decimal separator to use when formatting currency
Declaration
[DataMember]
public string CurrencyDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
string |
CurrencyGroupSeparator
If not null, specifies the group separator to use when formatting currency
Declaration
[DataMember]
public string CurrencyGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
string |
CurrencySymbolPosition
If not null, specifies the position in which to place the currency symbol when formatting currency
Declaration
[DataMember]
public CurrencySymbolPosition? CurrencySymbolPosition { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember]
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
[DataMember]
public bool FormatCurrencyPositionUniformly { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[DataMember]
public bool FormatCurrencySeparatorsUniformly { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[DataMember]
public bool FormatDateTimeUniformly { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[DataMember]
public bool FormatNumberSeparatorsUniformly { get; set; }
Property Value
Type | Description |
---|---|
bool |
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
[DataMember]
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
[DataMember]
public string LongDatePattern { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember]
public string LongTimePattern { get; set; }
Property Value
Type | Description |
---|---|
string |
NumberDecimalSeparator
If not null, specifies the decimal separator to use when formatting numbers
Declaration
[DataMember]
public string NumberDecimalSeparator { get; set; }
Property Value
Type | Description |
---|---|
string |
NumberGroupSeparator
If not null, specifies the group separator to use when formatting numbers
Declaration
[DataMember]
public string NumberGroupSeparator { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember]
public string ShortDatePattern { get; set; }
Property Value
Type | Description |
---|---|
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
[DataMember]
public string ShortTimePattern { get; set; }
Property Value
Type | Description |
---|---|
string |
UnitSeparationMode
Gets or sets the unit separation mode, which controls how units are separated from the numeric value in measurements.
Declaration
[DataMember]
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
[DataMember]
public char UnitSeparator { get; set; }
Property Value
Type | Description |
---|---|
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 |
---|---|
bool | A boolean value whether or not to attempt auto-substitution for this token. |