开发者

Excel to .NET resource file conversion

I have resource strings for various languages collected into a large excel sheet. Is there a tool to convert the strings for each langu开发者_运维知识库age into .NET resource files (resx)?

-pom


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜