// Translate a text
        public async static Task<string> TranslateText (Language SourceLang,Language TargetLang,LanguageService langserv,string text)
        {

            // a hack because auto loading doesn't working here?
            //EF7 if(EFDbContext.DataBase.LanguagesServices_Language.Local.Count == 0) EFDbContext.DataBase.LanguagesServices_Language.Load();
            
            LanguageService ls = langserv;
            
            if(ls == null)
            {
                ls =AppSetting.Current.TextTranslationService;
                if (ls == null)
                {
                    var bulder = new QueryBuilder<LanguageService>(EFDbContext.Context){
                        Where = $"{nameof(LanguageService.IsTranslatingText)} = 1",
                        Order = $"{nameof(LanguageService.IsTranslatingTextPriority)}"};
                    foreach (LanguageService serv in EFDbContext.Context.Query(bulder))
                    {
                        if (serv.IsSupportLangPair(SourceLang, TargetLang))
                        {
                            ls = serv;
                            break;
                        }
                    }
                }
            }

            if (ls == null)  throw new NotImplementedException("Can't found Language service for text translation");

            return ls.TranslateText(text,SourceLang,TargetLang);
        }
        // Translate a word
        public async static Task<WordOfDictionary> TranslateWord (Language SourceLang,Language TargetLang,LanguageService langserv,string word)
        {
            LanguageService ls = langserv;
            
            if(ls == null)
            {
                ls = AppSetting.Current?.WordTranslationService;
                if(ls == null)
                {
                    var services = LanguageServiceCollection.Where(x => x.IsTranslatingWords).OrderBy(x => x.IsTranslatingWordsPriority);
                    foreach (LanguageService serv in services)
                    {
                        if (serv.IsSupportLangPair(SourceLang, TargetLang))
                        {
                            ls = serv;
                            break;
                        }
                    }
                }
            }

            if (ls == null)  throw new NotImplementedException("Can't found Language service for word translation");

            return ls.TranslateWord(word,SourceLang,TargetLang);
        }
 private void PressLanguageServiceButton_Cmd(LanguageService service)
 {
     string url = service.ContextURL(CurrentWord.word_of_dictionary,CurrentWord.TargetLanguage, CurrentWord.NativeLanguage);
     if (string.IsNullOrEmpty(url))
     {
         SystemMessage.Show("Can't get URL for "+service);
         return;
     }
     NavigationService.OpenDialog(Views.WebBrowserForm,new WebBrowserForm_parameters { Address = url, Title = service.Name + "   " + CurrentWord });
 }