public ExcludedLanguageFilter(ExcludedLanguage language)
        {
            var lan = language.ToString();

            lan           = lan.Substring(0, lan.Length - "Original".Length);
            this.Name     = Strings.Resources.Controls.ExcludedLanguagesSelector.ExcludedLanguage.GetValue(lan);
            this.Language = language;
        }
        public ExcludedLanguageFilter(ExcludedLanguage language)
        {
            if (language == ExcludedLanguage.Default)
            {
                this.Name     = Strings.Resources.Controls.ExcludedLanguagesSelector.ExcludedLanguage.Japanese;
                this.Language = language;
                return;
            }
            var lan = language.ToString();

            lan           = lan.Substring(0, lan.Length - "Original".Length);
            this.Name     = Strings.Resources.Controls.ExcludedLanguagesSelector.ExcludedLanguage.GetValue(lan);
            this.Language = language;
        }
Example #3
0
        public static string ToDisplayNameString(this ExcludedLanguage language)
        {
            var languages = LocalizedStrings.Language.Names;
            var modifiers = LocalizedStrings.Language.Modifiers;

            var modifier = default(string);

            if (language.IsTranslated())
            {
                modifier  = modifiers.Translated;
                language -= Translated;
            }
            else if (language.IsRewrite())
            {
                modifier  = modifiers.Rewrite;
                language -= Rewrite;
            }

            string lang;

            switch (language)
            {
            case ExcludedLanguage.Default:
                lang = LocalizedStrings.Language.Names.Japanese;
                break;

            case ExcludedLanguage.EnglishOriginal:
                lang = LocalizedStrings.Language.Names.English;
                break;

            case ExcludedLanguage.ChineseOriginal:
                lang = LocalizedStrings.Language.Names.Chinese;
                break;

            case ExcludedLanguage.DutchOriginal:
                lang = LocalizedStrings.Language.Names.Dutch;
                break;

            case ExcludedLanguage.FrenchOriginal:
                lang = LocalizedStrings.Language.Names.French;
                break;

            case ExcludedLanguage.GermanOriginal:
                lang = LocalizedStrings.Language.Names.German;
                break;

            case ExcludedLanguage.HungarianOriginal:
                lang = LocalizedStrings.Language.Names.Hungarian;
                break;

            case ExcludedLanguage.ItalianOriginal:
                lang = LocalizedStrings.Language.Names.Italian;
                break;

            case ExcludedLanguage.KoreanOriginal:
                lang = LocalizedStrings.Language.Names.Korean;
                break;

            case ExcludedLanguage.PolishOriginal:
                lang = LocalizedStrings.Language.Names.Polish;
                break;

            case ExcludedLanguage.PortugueseOriginal:
                lang = LocalizedStrings.Language.Names.Portuguese;
                break;

            case ExcludedLanguage.RussianOriginal:
                lang = LocalizedStrings.Language.Names.Russian;
                break;

            case ExcludedLanguage.SpanishOriginal:
                lang = LocalizedStrings.Language.Names.Spanish;
                break;

            case ExcludedLanguage.ThaiOriginal:
                lang = LocalizedStrings.Language.Names.Thai;
                break;

            case ExcludedLanguage.VietnameseOriginal:
                lang = LocalizedStrings.Language.Names.Vietnamese;
                break;

            case ExcludedLanguage.NotApplicableOriginal:
                lang = LocalizedStrings.Language.Names.NotApplicable;
                break;

            default:
                lang = LocalizedStrings.Language.Names.Other;
                break;
            }

            if (modifier is null)
            {
                return(lang);
            }
            return(lang + " " + modifier);
        }
Example #4
0
 public static bool IsRewrite(this ExcludedLanguage language) => language >= Rewrite;
Example #5
0
 public static bool IsTranslated(this ExcludedLanguage language) => language < Rewrite && language >= Translated;
Example #6
0
 public static bool IsOriginal(this ExcludedLanguage language) => language < Translated;
 public ExcludedLanguageFilter(ExcludedLanguage language)
 {
     Name     = language.ToDisplayNameString();
     Language = language;
 }