Excel to .NET resource file conversion
Asked Answered
S

2

6

I have resource strings for various languages collected into a large excel sheet. Is there a tool to convert the strings for each language into .NET resource files (resx)?

-pom

Shogunate answered 14/6, 2011 at 9:49 Comment(1)
Something like codeproject.com/KB/cs/Resx2Xls.aspx or codeproject.com/KB/cs/resxwriter.aspx?Otherworldly
F
9

Simple cut-and-paste worked for me:

  1. In the excel create a table with two columns: one for the control names, the second with the words/phrases of the language you have next to each control name (the control names can be copied from VS simply by selecting the controls "Name" column in the resx file and pasting in excel...)
  2. Create an empty resx file for that language (such as yourproject.language.ru.resx)
  3. In the excel select and copy the two columns from 1 above
  4. back in the empty resx file, mark the "Name" and "Value" fields of the first empty row
  5. Right-click paste

As I develop, I maintain only the English language file. For each release, I update the excel with the new controls and their translations, remove the other old languages resx files, re-create then and past as described above.

Fulkerson answered 7/3, 2014 at 14:8 Comment(0)
E
0

I was looking for something similar and created a tool for it years back. I open sourced it a couple of weeks ago: https://github.com/jtorvald/excel2resource/

Binaries available under releases for Mac/Linux and Windows.

You can use this tool to generate the resource files once or watch the Excel file for changes and generate on every save.

Erfurt answered 1/5, 2022 at 10:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.