开源软件名称(OpenSource Name):fmuecke/XliffParser开源软件地址(OpenSource Url):https://github.com/fmuecke/XliffParser开源编程语言(OpenSource Language):C# 98.4%开源软件介绍(OpenSource Introduction):XliffParserThis library is intended as a thin layer above the original markup to help access the contents of XLIFF (XML Localization Interchange File Format) files. Its main purposes are:
More information on XLIFF can be found here:
nuget.orgAvailable onTo install XliffParser, run the following command in the Package Manager Console
ExamplesReading values from a XLIFF filevar doc = new XliffParser.XlfDocument(fileName);
var xlfFile = doc.Files.Single();
foreach (var u in xlfFile.TransUnits)
{
// id | source | target | target state
Console.WriteLine("{0}|{1}|{2}", u.Id, u.Source, u.Target, u.Optional.TargetState);
} Changing values inside a XLIFF filevar unit = xlfFile.AddTransUnit("MyResourceId", "some resouce string", "my awesome translation");
unit.Optional.TargetState = "translated";
unit.Optional.AddNote("No comment!", "XliffParser");
doc.Save(); Exporting translation data to C# resource files (resx)doc.SaveAsResX(); Updating XLIFF file from C# resource files (resx)var result = doc.UpdateFromSource();
Console.WriteLine("updated: {0}, added: {1}, removed: {2}",
result.UpdatedItems.Count(), result.AddedItems.Count(), result.RemovedItems.Count()); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论