Skip to content

Instantly share code, notes, and snippets.

@LazZiya
Last active November 14, 2020 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LazZiya/293e5fb33d98e5e52023750a39f66b7f to your computer and use it in GitHub Desktop.
Save LazZiya/293e5fb33d98e5e52023750a39f66b7f to your computer and use it in GitHub Desktop.
XLocalizer options in json settings file
{
"XLocalizerOptions": {
"ResourcesPath": "LocalizationResources",
"AutoAddKeys": true,
"AutoTranslate": true,
"UseExpressMemoryCache": true,
"TranslateFromCulture": "en",
"ValidationErrors": {
"CompareAttribute_MustMatch": "'{0}' and '{1}' do not match. They should not be different!",
"CreditCardAttribute_Invalid": "The {0} field is not a valid credit card number.",
"CustomValidationAttribute_ValidationError": "{0} is not valid.",
"...": "..."
},
"IdentityErrors": {
"DuplicateEmail": "Email '{0}' is already taken.",
"DuplicateUserName": "User name '{0}' is already taken. Please try another one.",
"InvalidEmail": "Email '{0}' is invalid.",
"...": "..."
},
"ModelBindingErrors": {
"AttemptedValueIsInvalidAccessor": "The value '{0}' is not valid for {1}.",
"MissingBindRequiredValueAccessor": "A value for the '{0}' parameter or property was not provided.",
"MissingKeyOrValueAccessor": "A value is required.",
"...": "..."
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment