Witam. Czy ktoś wie lub ma tłumaczenia krajów na popularne języki tj pl, en, de? Chce to wrzucić do plików resx.
Na obecną chwile korzystam z dodatku resxManager. Tzn importuje sobie plik excela wygenerowany wcześniej w ten sposób:
using (ExcelPackage excel = new ExcelPackage())
{
excel.Workbook.Worksheets.Add("ResXResourceManager");
var excelWorksheet = excel.Workbook.Worksheets["ResXResourceManager"];
excelWorksheet.Cells["A1"].Value = "Project";
excelWorksheet.Cells["B1"].Value = "File";
excelWorksheet.Cells["C1"].Value = "Key";
excelWorksheet.Cells["D1"].Value = "Comment";
excelWorksheet.Cells["E1"].Value = ".en-US";
excelWorksheet.Cells["F1"].Value = "Comment";
excelWorksheet.Cells["G1"].Value = ".pl-PL";
var cinfo = CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures).Where(d => d.Name.Length == 5).ToList();
int startIndex = 2;
foreach (CultureInfo cul in cinfo)
{
excelWorksheet.Cells[$"A{startIndex}"].Value = "Application";
excelWorksheet.Cells[$"B{startIndex}"].Value = @"Resources\Mapper.MappingProfile";
excelWorksheet.Cells[$"C{startIndex}"].Value = cul.Name;
excelWorksheet.Cells[$"D{startIndex}"].Value = string.Empty;
excelWorksheet.Cells[$"E{startIndex}"].Value = cul.EnglishName.Split('(', ')')[1];
excelWorksheet.Cells[$"G{startIndex}"].Value = cul.DisplayName.Split('(', ')')[1];
startIndex++;
}
FileInfo excelFile = new FileInfo("test.xlsx");
excel.SaveAs(excelFile);
}
ale z tego kodu w excelu pojawiają się takie kwiatki:
Resources\Mapper.MappingProfile ar-SS South Sudan جنوب السودان
Czyli tłumaczenie angielskie jest ok ale polskie już nie bardzo