Пример #1
0
        public static IValidationContextOptions AddPolishTranslation(this IValidationContextOptions @this, bool asDefault = false, IDictionary <string, string> include = null)
        {
            @this.AddTranslation(nameof(Phrases.Polish), Phrases.Polish, asDefault);

            if (include != null)
            {
                @this.AddTranslation(nameof(Phrases.Polish), include);
            }

            return(@this);
        }
Пример #2
0
        public static IValidationContextOptions IncludeInEnglishTranslation(this IValidationContextOptions @this, IDictionary <string, string> include)
        {
            if (include == null)
            {
                throw new ArgumentNullException(nameof(include));
            }

            @this.AddTranslation(nameof(Phrases.English), include);

            return(@this);
        }