Reference to a fallback of the same service or null if no fallback. When assigned, a call to any function (except registration) will first try itself, and if not found, try the fallback.
Reference to a fallback of the same service or null if no fallback.
Sets up a function to lazy load the configuration when the localize() function tries and fails to match a request.
Returns the localized version of the text for the given culture. Will try the language from the culture ('en' from 'en-US') and a code called '' to be used as a general fallback. You will have to register the '' code along with your language code translations if you want support of ''. service.Register('TRUE', { '': 'true', 'en': 'true', 'es': 'verdadero' }); If nothing is matched, it returns the fallback text.
It will only use the language code part, like 'en' in 'en-US'. It will always attempt to match to '*' if the language code doesn't match.
Localization key, which is the text that identifies which word, phrase, or other block of text is requested. If '' or null, no localization is requested.
Used when there was no match for the culture or '*'. Only supply '' if you are sure that registered data will always supply a value.
The localized text or the fallback text.
Localizes the given text with additional details. See localize() for more information. This targets the ConfigAnalysis.
The culture ID to match for localization.
The localization key.
The fallback text to use if localization fails.
An object containing the localized text, localization result, requested culture ID, and actual culture ID.
Attempts to get the localized error message for the ErrorCode and optional DataTypeLookupKey. If dataTypeLookupKey is supplied and no match is found, it tries with just the ErrorCode.
same as ConditionType unless you set the ValidatorConfig.errorCode property
The error message or null if not available.
Protected
getAttempts to get the localized Summary error message for the ErrorCode and optional DataTypeLookupKey If dataTypeLookupKey is supplied and no match is found, it tries with just the ErrorCode.
same as ConditionType unless you set the ValidatorConfig.errorCode property
The Summary error message or null if not available.
Protected
getProtected
getRegisters a lookup key with the culture specific text. Replaces an already registered entry with the same l10nKey.
Localization key, which is the text that identifies which word, phrase, or other block of text is requested.
keys are language codes from cultureId, like 'en'. values are the actual text to output.
Utility to add an error message for a validator. The localization key (l10ntext) will use this pattern: 'EM-' + ErrorCode + '-' + DataTypeLookupKey 'EM-' + ErrorCode // this is a fallback
same as ConditionType unless you set the ValidatorConfig.errorCode property
optional.
Utility to add a summary error message for a validator The localization key (l10ntext) will use this pattern: 'SEM-' + ErrorCode + '-' + DataTypeLookupKey 'SEM-' + ErrorCode // this is a fallback
same as ConditionType unless you set the ValidatorConfig.errorCode property
optional.
Utility to add text representation of a data type associating it with its dataTypeLookupKey. The text is used with the {DataType} token in error messages. The localization key (l10ntext) will use this pattern: 'DTLK-' + DataTypeLookupKey
Protected
ensureGenerated using TypeDoc v0.25.12
A service to offer text alternatives to the default text based on cultureId.
It supports having fallbacks, so the app can have a standard implementation and another that introduces special cases.
To set that up:
This implementation is independent of third party libraries that you may be using. Thus, you may prefer to implement ITextLocalizerService yourself.
There are two text values associated with localization: