コード例 #1
0
ファイル: WikiLanguages.cs プロジェクト: Ashod/WikiDesk
 public static LanguageCodes DefaultLanguageCodes()
 {
     // Add default languages.
     LanguageCodes codes = new LanguageCodes();
     codes.Languages.Add(new WikiLanguage("English", "en") { LocalName = "English" });
     codes.Languages.Add(new WikiLanguage("German", "de") { LocalName = "Deutsch" });
     codes.Languages.Add(new WikiLanguage("French", "fr") { LocalName = "Français" });
     codes.Languages.Add(new WikiLanguage("Polish",  "pl") { LocalName = "Polski" });
     codes.Languages.Add(new WikiLanguage("Italian", "it") { LocalName = "Italiano" });
     codes.Languages.Add(new WikiLanguage("Japanese", "ja") { LocalName = "日本語" });
     codes.Languages.Add(new WikiLanguage("Spanish", "es") { LocalName = "Español" });
     codes.Languages.Add(new WikiLanguage("Dutch", "nl") { LocalName = "Nederlands" });
     codes.Languages.Add(new WikiLanguage("Portugues", "pt") { LocalName = "Português" });
     codes.Languages.Add(new WikiLanguage("Russian", "ru") { LocalName = "Русский" });
     codes.Languages.Add(new WikiLanguage("Swedish", "sv") { LocalName = "Svenska" });
     codes.Languages.Add(new WikiLanguage("Chinese", "zh") { LocalName = "中文" });
     codes.Languages.Add(new WikiLanguage("Catalan", "ca") { LocalName = "Català" });
     codes.Languages.Add(new WikiLanguage("Norwegian", "no") { LocalName = "Norsk (Bokmål)" });
     codes.Languages.Add(new WikiLanguage("Finnish", "fi") { LocalName = "Suomi" });
     codes.Languages.Add(new WikiLanguage("Ukrainian", "uk") { LocalName = "Українська" });
     codes.Languages.Add(new WikiLanguage("Hungarian", "hu") { LocalName = "Magyar" });
     codes.Languages.Add(new WikiLanguage("Czech", "cs") { LocalName = "Čeština" });
     codes.Languages.Add(new WikiLanguage("Romanian", "ro") { LocalName = "Română" });
     codes.Languages.Add(new WikiLanguage("Turkish", "tr") { LocalName = "Türkçe" });
     return codes;
 }
コード例 #2
0
ファイル: ImportForm.cs プロジェクト: Ashod/WikiDesk
        public ImportForm(WikiDomains domains, LanguageCodes languages)
        {
            InitializeComponent();

            domains_ = domains;
            languages_ = languages;

            foreach (WikiDomain wikiDomain in domains.Domains)
            {
                cboDomains_.Items.Add(wikiDomain.Name);
            }

            cboDomains_.SelectedIndex = -1;

            foreach (WikiLanguage wikiLanguage in languages_.Languages)
            {
                cboLanguages_.Items.Add(wikiLanguage.LocalName);
            }

            //TODO: Automatically select the default or current language.
            cboLanguages_.SelectedIndex = (cboLanguages_.Items.Count > 0) ? 0 : -1;

            UpdateDumpInfo();
        }