あなたが探している答えがどれほど包括的なものかはわかりませんが、ローカリゼーションに [string, string] ペアを実際に使用しているだけで、リソース (.resx) をロードする簡単な方法を探しているだけの場合ファイルに翻訳結果が含まれている場合、以下はかなり迅速でローテクなソリューションとして機能します。
覚えておくべきことは、.resx ファイルは単なる XML ドキュメントであるため、外部のコードからリソースにデータを手動でロードできる必要があるということです。次の例は、VS2005 と VS2008 でうまくいきました。
namespace SampleResourceImport
{
class Program
{
static void Main(string[] args)
{
XmlDocument doc = new XmlDocument();
string filePath = @"[file path to your resx file]";
doc.Load(filePath);
XmlElement root = doc.DocumentElement;
XmlElement datum = null;
XmlElement value = null;
XmlAttribute datumName = null;
XmlAttribute datumSpace = doc.CreateAttribute("xml:space");
datumSpace.Value = "preserve";
// The following mocks the actual retrieval of your localized text
// from a CSV or ?? document...
// CSV parsers are common enough that it shouldn't be too difficult
// to find one if that's the direction you go.
Dictionary<string, string> d = new Dictionary<string, string>();
d.Add("Label1", "First Name");
d.Add("Label2", "Last Name");
d.Add("Label3", "Date of Birth");
foreach (KeyValuePair<string, string> pair in d)
{
datum = doc.CreateElement("data");
datumName = doc.CreateAttribute("name");
datumName.Value = pair.Key;
value = doc.CreateElement("value");
value.InnerText = pair.Value;
datum.Attributes.Append(datumName);
datum.Attributes.Append(datumSpace);
datum.AppendChild(value);
root.AppendChild(datum);
}
doc.Save(filePath);
}
}
}
明らかに、前述の方法ではリソースの分離コードは生成されませんが、Visual Studio でリソース ファイルを開き、リソースのアクセシビリティ修飾子を切り替えると、静的プロパティが (再) 生成されます。
完全に XML ベースのソリューション (対 CSV または Excel 相互運用) を探している場合は、翻訳されたコンテンツを Excel に保存し、XML として保存し、XPath を使用してローカリゼーション情報を取得するように翻訳者に指示することもできます。唯一の注意点は、ファイル サイズがかなり肥大化する傾向があることです。
幸運を祈ります。