### Build L10NSharp Project Source: https://github.com/sillsdev/l10nsharp/blob/master/README.md Use this command to build the L10NSharp solution from the command line. Ensure you have the .NET SDK installed. ```bash dotnet build ``` -------------------------------- ### Create LocalizationManager with TranslationMemory (C#) Source: https://github.com/sillsdev/l10nsharp/blob/master/CHANGELOG.md Demonstrates how to create a LocalizationManager instance, now requiring a TranslationMemory parameter. Refer to the migration guide for details. ```csharp LocalizationManager.Create(TranslationMemory.XLiff, lang, "SampleApp", "SampleApp", Application.ProductVersion, directoryOfInstalledXliffFiles, "MyCompany/L10NSharpSample", icon, "sample@example.com", "SampleApp"); ``` -------------------------------- ### Pack and Publish Local NuGet Packages Source: https://github.com/sillsdev/l10nsharp/blob/master/README.md This command packs NuGet packages and publishes them to a local repository specified by the LOCAL_NUGET_REPO environment variable. This is useful for testing local modifications in client projects. ```bash build /t:pack ``` -------------------------------- ### Create LocalizationManager for .NET Applications Source: https://github.com/sillsdev/l10nsharp/blob/master/README.md Use this snippet to initialize the LocalizationManager for standard .NET applications. It requires parameters for language, application names, version, XLIFF file directory, and company/product identifiers. ```csharp using (var lm = LocalizationManager.Create(lang, "SampleApp", "SampleApp", productVersion, directoryOfInstalledXliffFiles, "MyCompany/L10NSharpSample", "sample@example.com", "SampleApp") { // existing code to run the application } ``` -------------------------------- ### Run L10NSharp Unit Tests Source: https://github.com/sillsdev/l10nsharp/blob/master/README.md Execute unit tests for the L10NSharp project using the .NET CLI. NUnit is used for testing and is managed via NuGet. ```bash dotnet test ``` -------------------------------- ### Create Localization Manager with Translation Memory Type Source: https://github.com/sillsdev/l10nsharp/wiki/Migration Use this method to create an `ILocalizationManager` object, specifying the translation memory type (TMX or XLIFF) as an additional parameter. ```csharp ILocalizationManager manager = LocalizationManager.Create(TranslationMemory.XLiff, lang, "SampleApp", "SampleApp", Application.ProductVersion, directoryOfInstalledXliffFiles, "MyCompany/L10NSharpSample", icon, "sample@example.com", "SampleApp"); ``` -------------------------------- ### Create LocalizationManager for Windows Forms Applications Source: https://github.com/sillsdev/l10nsharp/blob/master/README.md This snippet initializes the LocalizationManager for Windows Forms applications. It includes an optional icon parameter for the forms dialog, in addition to the parameters required for standard .NET applications. ```csharp using (var lm = LocalizationManager.Create(lang, "SampleApp", "SampleApp", productVersion, directoryOfInstalledXliffFiles, "MyCompany/L10NSharpSample", icon, "sample@example.com", "SampleApp") { // existing code to run the application } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.