VintaSoft Imaging .NET SDK can be localized into any language.
The SDK includes localized VintaSoft .NET assemblies and VintaSoft WinForms demo projects, which are localized into German language, as an example showing that the SDK can be localized into any language.
Also the SDK includes localized VintaSoft ASP.NET Core demo projects, which are localized into 32 languages, as an example showing that the SDK solution for web can be localized into any language.
If you want to localize string constants and UI-controls of VintaSoft .NET assembly, please read how to do this in "Localize VintaSoft .NET assembly" section of this article.
If you want to localize string constants and UI of VintaSoft WinForms demo project, please read how to do this in "Localize VintaSoft WinForms demo project" section of this article.
If you want to localize string constants and UI of VintaSoft ASP.NET demo project, please read how to do this in "Localize VintaSoft ASP.NET demo project" section of this article.
Localize VintaSoft .NET assembly
All VintaSoft .NET assemblies have English language localization.
Also VintaSoft Imaging .NET SDK provides the ability to localize the following VintaSoft .NET assemblies (using satellite resource assemblies) into any language:
- Vintasoft.Imaging.dll
- Vintasoft.Imaging.UI.dll
- Vintasoft.Imaging.Annotation.Dicom.dll
- Vintasoft.Imaging.Annotation.Dicom.UI.dll
- Vintasoft.Imaging.Annotation.Dicom.Wpf.UI.dll
- Vintasoft.Imaging.Dicom.dll
- Vintasoft.Imaging.Dicom.Mpr.dll
- Vintasoft.Imaging.Dicom.Mpr.UI.dll
- Vintasoft.Imaging.Dicom.Mpr.Wpf.UI.dll
- Vintasoft.Imaging.Dicom.UI.dll
- Vintasoft.Imaging.Dicom.Wpf.UI.dll
- Vintasoft.Imaging.Pdf.dll
- Vintasoft.Imaging.Pdf.JavaScript.dll
- Vintasoft.Imaging.Pdf.UI.dll
- Vintasoft.Imaging.Pdf.Wpf.UI.dll
If you want to localize a Vintasoft .NET assembly, which is not present in the list above, please let us know and we will provide you the ability to localize the necessary Vintasoft .NET assembly.
Installer of VintaSoft Imaging .NET SDK delivers satellite assemblies in German language, which can be found in "{SdkInstallPath}\Imaging .NET v12.2\Bin\DotNetX\AnyCPU\de\" folder.
If you want to localize a VintaSoft .NET assembly from the list above, for example Vintasoft.Imaging.Pdf.dll, you should do the following steps:
- Extract the "Vintasoft.Imaging.Pdf.Localization.Strings.resources" resource file with constant strings from Vintasoft.Imaging.Pdf.dll assembly.
Here is C# code of .NET console application that allows to extract the "Vintasoft.Imaging.Pdf.Localization.Strings.resources" resource file from Vintasoft.Imaging.Pdf.dll assembly:
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string dotNetAssemblyFileName = @"D:\VintaSoft\Imaging .NET v12.2\Bin\DotNet7\AnyCPU\Vintasoft.Imaging.Pdf.dll";
string resourceFileName = "Vintasoft.Imaging.Pdf.Localization.Strings.resources";
ExtractBinaryResourceFromDotNetAssembly(dotNetAssemblyFileName, resourceFileName);
}
static void ExtractBinaryResourceFromDotNetAssembly(string dotNetAssemblyFileName, string resourceFileName)
{
System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(dotNetAssemblyFileName);
System.IO.Stream resourceStream = assembly.GetManifestResourceStream(resourceFileName);
byte[] resourceStreamBytes = new byte[resourceStream.Length];
resourceStream.Read(resourceStreamBytes, 0, resourceStreamBytes.Length);
System.IO.File.WriteAllBytes(resourceFileName, resourceStreamBytes);
}
}
}
- Convert the extracted "Vintasoft.Imaging.Pdf.Localization.Strings.resources" resource file into .resx file. This can be done using the ResGen utility.
Here is command line that allows to convert .NET binary resource file into .resx file:
"{Path_to_ResGen.exe_file}\ResGen.exe" Vintasoft.Imaging.Pdf.Localization.Strings.resources Strings.resx
- Create Strings.resx file with constant strings, which are translated into necessary language, for example Spanish language:
- Rename the String.resx file to the Strings.es.resx file.
- Open the Strings.es.resx file in any text editor and translate string constants (strings in "value" tags) from English language to Spanish language.
- Create the satellite assembly that contains translated constant strings:
- Create the "Vintasoft.Imaging.Pdf.es.resources" folder and go to the folder.
- Create "Vintasoft.Imaging.Pdf.csproj" file using any text editor and add the following text to the created file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
- Create the "Localization" folder and go to the folder.
- Copy the Strings.es.resx file to the "Localization" folder.
- Go to the "Vintasoft.Imaging.Pdf.es.resources" folder.
- Compile the project using the following command:
dotnet build Vintasoft.Imaging.Pdf.csproj
- The satellite assembly "Vintasoft.Imaging.Pdf.resources.dll" will be created in the "bin\Debug\net7.0\es\" folder.
- Use the satellite assembly with Vintasoft.Imaging.Pdf.dll assembly:
Localize VintaSoft WinForms demo project
If you want to localize a WinForms project, you should do the following steps:
- Localize UI of WinForms forms, which is used in project:
- For each WinForms form of project:
- Open WinForms form in WinForms designer of Visual Studio.
- Set the "Localizable" property of the form to True.
- Set the "Language" property of the form to the desired language, for example Spanish, => designer will create FormName.es.resx file that contains information about Spanish localization of form.
- Localize UI elements of form and information about the localization will be saved to the FormName.es.resx file.
- Localize string constants, which are used in source codes of project:
- Create "Localization" folder in project.
- Add the resource file with name "Strings.resx" to the "Localization" folder.
- For each constant string in project code:
- Add the constant string to the Strings.resx resource file.
- Replace the constant string in the project code by code that accesses the constant string in the Strings.resx resource file.
All VintaSoft WinForms demo projects have English language localization.
Also the SDK provides German localization for 3 VintaSoft WinForms demo projects (DicomViewerDemo, PdfEditorDemo, SpreadsheetEditorDemo) as an example showing that VintaSoft WinForms demo projects can be localized into any language.
If you want to localize a VintaSoft WinForms demo project, which is already localized (e.g. has German localization), you should do the following steps:
- Localize UI of WinForms forms, which are used in project, the way written above in instructions for localization of any WinForms project.
- Localize string constants, which are used in source codes of project:
- Create a copy of "Localization\Strings.resx" file => "Strings - Copy.resx" and "Strings - Copy.Designer.cs" files will be created.
- Delete the file "Strings - Copy.Designer.cs".
- Rename the file "Strings - Copy.resx" to "Strings.es.resx" file.
- Open the "Strings.es.resx" file in resource designer of Visual Studio and translate string constants from English language to Spanish language.
If you want to localize a VintaSoft WinForms demo project, which is not localized currently, you can go by 2 ways.
WAY 1: Localize the VintaSoft WinForms demo project the way written above in instructions for localization of any WinForms project.
WAY 2: Send us a request to localize the VintaSoft WinForms demo project to the desired language and we will try to help you with localization.
Localize VintaSoft ASP.NET demo project
Each VintaSoft ASP.NET demo project consists from 2 parts: JavaScript UI controls, which define the UI and logic of web application, and VintaSoft Web services, which serve requests from JavaScript UI controls and use functionality of VintaSoft Imaging .NET SDK.
VintaSoft ASP.NET Core Document Viewer Demo provides ready-to-use localization dictionaries, which allow to localize the
VintaSoft web document viewer into 32 languages (Afrikaans, Arabic, Belarusian, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Greece, Hebrew, Hindi, Hungarian, Italian, Japanese, Korean, Norwegian, Portugese, Romanian, Russian, Slovakian, Slovenian, Spanish, Swahili, Swedish, Turkish, Vietnamese, Zulu). You can test the ready-to-use localization of VintaSoft Web Document Viewer using
on-line version of VintaSoft ASP.NET Core Document Viewer Demo. More information about localization of VintaSoft Web Document Viewer can be found
here.
VintaSoft ASP.NET Spreadsheet Editor Demo provides ready-to-use localization dictionaries, which allow to localize the
VintaSoft web spreadsheet document editor into 32 languages (Afrikaans, Arabic, Belarusian, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, English, Finnish, French, German, Greece, Hebrew, Hindi, Hungarian, Italian, Japanese, Korean, Norwegian, Portugese, Romanian, Russian, Slovakian, Slovenian, Spanish, Swahili, Swedish, Turkish, Vietnamese, Zulu). You can test the ready-to-use localization of VintaSoft Web Document Viewer using
on-line version of VintaSoft ASP.NET Core Spreadsheet Editor Demo. More information about localization of VintaSoft Web Spreadsheet Document Editor can be found
here.
The ready-to-use localization dictionaries of VintaSoft ASP.NET Core Document Viewer Demo and VintaSoft ASP.NET Spreadsheet Editor Demo can be used in any ASP.NET demo project, i.e. localization dictionaries can be used in ASP.NET Core, ASP.NET Core + Angular, ASP.NET MVC5 and ASP.NET WebForms. This is possible because VintaSoft ASP.NET Demos use the same JavaScript code for all ASP.NET platforms.
If you want to localize the string constants, which are returned by VintaSoft Web service, you should localize VintaSoft .NET assembly as described in "Localize VintaSoft .NET assembly" section.