How to paste multiple strings into .net .resx files?
Asked Answered
B

5

6

I have many .resx files used for translations in a large site. To get the translations done, I copy and paste the content of each resx file into a spreadsheet. The spreadsheet comes back from the translator with the new language appended as an extra column. I've tried copying the column from the spreadsheet and pasting into the value column in the resx file but it won't work. I'm now reduced to cutting and pasting thousands of individual phrases from the spreadsheet to the resx file. There must be a better way. Is there?

Bogeyman answered 13/4, 2012 at 10:4 Comment(0)
J
2

Instead of using a spreadsheet, we use ResEx. This allows the translator to directly produce the .resx file.

Jonquil answered 13/4, 2012 at 10:9 Comment(0)
H
9

There's a way!

You can't copy/paste a single column, but you CAN copy/paste all columns - basically it's all or nothing. Sooo...just get your spreadsheet to exactly how you want the resx file, then clear out all the contents of the resx file, and finally copy everything from the spreadsheet and paste the whole thing into the resx file. Boom!

Hebbe answered 12/5, 2017 at 16:9 Comment(1)
I prefer this over downloading a separate tool.Grindery
J
2

Instead of using a spreadsheet, we use ResEx. This allows the translator to directly produce the .resx file.

Jonquil answered 13/4, 2012 at 10:9 Comment(0)
A
1

You can find localization tools that handle .resx files. So instead of copy/pasting your content from .resx files, you just send them as they are to the translator and they'll send you back a translated .resx file in their language. Productivity aside, it's better to do it this way as your .resx files may contain useful information such as comments to help translators understand the context or to communicate them any known restrictions (such as maximum length) that apply to a given string.

Anya answered 13/4, 2012 at 10:9 Comment(0)
B
0

Resx is just an XML so you can make simple script to generate it from speadsheet file (save as csv for easy processing).

Brittain answered 13/4, 2012 at 10:10 Comment(0)
S
0

The following link from Resx Resource Manager support site was very helpful with copying back into Resx RM from a spreadsheet:

https://github.com/dotnet/ResXResourceManager/blob/master/Documentation/Topics/Copy,-Paste,-Export-and-Import.md#cell-selection

Right-click on the grid select 'Cell selection' and then you can paste in the selected contents of an excel spreadsheet in one go.

Sidsida answered 12/4, 2023 at 8:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.