The number of words .resx files.

we will process our .resx files for translation. Since these files contain a lot of XML data, apart from the lines that need to be translated, I was looking for a way in which we can count the words / lines that were translated. We have winform created resx file

Thanks.

+3
source share
1 answer

Look for properties named Text and other properties that are translatable strings that concern you.

System.Resources.ResXResourceReader reader = new System.Resources.ResXResourceReader(@"..\..\Form1.resx");
foreach(System.Collections.DictionaryEntry de in reader)
{
   if (((string)de.Key).EndsWith(".Text"))
   {
      System.Diagnostics.Debug.WriteLine(string.Format("{0}: {1}", de.Key, de.Value));
   }
}
+3
source

Source: https://habr.com/ru/post/1724488/


All Articles