public void LoadLanguages(string language) { if (language == null) { return; } LabelsAndMessagesTagEmployee labelsAndMessagesTagEmployee = new LabelsAndMessagesTagEmployee(); WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "TagEmployee"); }
public void Setup_SetLanguage(string language) { if (language == null) { return; } LabelsAndMessagesTagEmployee labelsAndMessagesTagEmployee = new LabelsAndMessagesTagEmployee(); WPFLanguage wPFLanguage = LanguageHelper.GetLanguageForForms(language, "TagEmployee"); LabelsAndMessagesTagEmployee labelsAndMessages = new LabelsAndMessagesTagEmployee(); LanguageElement languageElement; languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeID).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeID = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelEmployees_LastName).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LabelsFromDBTagEmployee.LabelEmployees_LastName = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTag_TextDesc).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LabelsFromDBTagEmployee.LabelTag_TextDesc = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsFromDB.Where(x => x.OriginalValue == labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeTextDesc).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LabelsFromDBTagEmployee.LabelTagEmployeeTextDesc = languageElement.TranslatedValue; } //Labels languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnNew).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnNew = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnDelete).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnDelete = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsDefaultControls.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnUpdate).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsControlsTagEmployee.LabelBtnUpdate = languageElement.TranslatedValue; } //Messages languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxDeleteConfirm).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxDeleteConfirm = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveError = languageElement.TranslatedValue; } languageElement = wPFLanguage.LanguageElementsDefaultMessages.Where(x => x.OriginalValue == labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK).FirstOrDefault(); if (languageElement != null) { labelsAndMessages.LanguageElementsMessagesTagEmployee.MessageBoxSaveOK = languageElement.TranslatedValue; } TagEmployeeDataContext.LabelsAndMessagesTagEmployee = labelsAndMessages; }