生成资源

IResourceWriter writer  =   new  ResourceWriter( string .Format( " {0}{1} " , path,  " En.resources " ));
foreach  (DataRow row  in  ds.Tables[ 0 ].Rows)
{
    writer.AddResource(row[
" Id " ].ToString(), row[ " msg " ].ToString());
}
writer.Close();

writer 
=   new  ResourceWriter( string .Format( " {0}{1} " , path,  " zh-Chs.resources " ));
foreach  (DataRow row  in  ds.Tables[ 0 ].Rows)
{
    writer.AddResource(row[
" Id " ].ToString(), row[ " msgchs " ].ToString());
}
writer.Close();

writer 
=   new  ResourceWriter( string .Format( " {0}{1} " , path,  " zh-Cht.resources " ));
foreach  (DataRow row  in  ds.Tables[ 0 ].Rows)
{
    writer.AddResource(row[
" Id " ].ToString(), row[ " msgcht " ].ToString());
}
writer.Close();

你可能感兴趣的:(生成)