Interface ILocalizableToken
Defines the interface for auto-localizable tokens. Localizable tokens have a value, and their surface representation ("text") can be automatically converted into a target culture representation, given the token's value and the target culture.
Namespace: Sdl.LanguagePlatform.Core.Tokenization
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public interface ILocalizableToken
Properties
TokenizationContext
The Tokenization
Declaration
TokenizationContext TokenizationContext { get; set; }
Property Value
Type | Description |
---|---|
Tokenization |
Methods
Localize(CultureInfo, AutoLocalizationSettings)
Auto-localizes the token according to the settings of the specified target culture and the provided auto-localization settings. The text of the token will be changed, but not the values.
For some token types, special Auto
Declaration
bool Localize(CultureInfo culture, AutoLocalizationSettings autoLocalizationSettings)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The target culture |
Auto |
autoLocalizationSettings | Contains the Auto |
Returns
Type | Description |
---|---|
System. |
|
Localize(CultureInfo, AutoLocalizationSettings, ILocalizableToken, Boolean)
Auto-localizes the token according to the settings of the specified target culture and the provided auto-localization settings. The text of the token will be changed, but not the values.
For some token types, special Auto
Declaration
bool Localize(CultureInfo culture, AutoLocalizationSettings autoLocalizationSettings, ILocalizableToken originalMemoryToken, bool adjustCasing)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The target culture |
Auto |
autoLocalizationSettings | Contains the Auto |
ILocalizable |
originalMemoryToken | The original memory token. Some auto-localization settings will be derived from the token, if provided. |
System. |
adjustCasing | If true, it is assumed that the token is in segment-initial position. Then, casing will be adjusted if the original memory token is supplied as well. |
Returns
Type | Description |
---|---|
System. |
|
SetValue(Token, Boolean)
Overwrites the current token's value with the value from blueprint
, which
also must be a Date
Declaration
bool SetValue(Token blueprint, bool keepNumericSeparators)
Parameters
Type | Name | Description |
---|---|---|
Token | blueprint | The token to take the value from |
System. |
keepNumericSeparators | Applicable to numeric (number and measurement) tokens only: if true, do not override the original group and decimal separators. |
Returns
Type | Description |
---|---|
System. |
A flag indicating whether the token's value or type were changed. |