Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 language into .NET resource files (resx)?

-pom

like image 417
Pompair Avatar asked Jun 14 '11 09:06

Pompair


People also ask

What is the RESX file in C#?

A . resx file contains a standard set of header information that describes the format of the resource entries, and specifies the versioning information for the XML code that parses the data. These files contain all the strings, labels, captions, and titles for all text in the three IBM Cognos Office components.

How do I open a RESX file?

Navigate to resources from File Structure Open a . resx file in the XML (Text) editor. Press Ctrl+Alt+F or choose ReSharper | Windows | File Structure from the main menu . Alternatively, you can press Ctrl+Shift+A , start typing the command name in the popup, and then choose it there.


1 Answers

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.

like image 98
yoosha Avatar answered Sep 19 '22 13:09

yoosha