コード例 #1
0
        public static void TranslateProject(string apikey, string project_path, TranslatorDefinition transdef, Language sourceLanguage)
        {
            AndroidProject     project = new AndroidProject(project_path);
            ResourceTranslator rt      = new ResourceTranslator(project, transdef.CreateInstance(apikey), sourceLanguage);

            rt.TranslateProject();
        }
コード例 #2
0
        public static void TranslateProject(string apikey, string project_path, TranslatorDefinition transdef, Language sourceLanguage)
        {
            AndroidProject project = new AndroidProject(project_path);
            ResourceTranslator rt = new ResourceTranslator(project, transdef.CreateInstance(apikey), sourceLanguage);

            rt.TranslateProject();
        }
コード例 #3
0
        private void cbTranslateService_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ValidateApiKey())
            {
                TranslatorDefinition transdef   = GetSelectedTranslatorDefinition();
                ITranslator          translator = transdef.CreateInstance(GetApiKey());
                List <Language>      languages  = translator.GetSupportedLanguages();

                cbSourceLang.BeginUpdate();
                cbSourceLang.Items.Clear();
                cbSourceLang.Items.AddRange(languages.ToArray());
                cbSourceLang.SelectedIndex = 0;
                cbSourceLang.EndUpdate();
            }
        }