LazyApiPack.Localization 0.2.1.1

dotnet add package LazyApiPack.Localization --version 0.2.1.1                
NuGet\Install-Package LazyApiPack.Localization -Version 0.2.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LazyApiPack.Localization" Version="0.2.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LazyApiPack.Localization --version 0.2.1.1                
#r "nuget: LazyApiPack.Localization, 0.2.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LazyApiPack.Localization as a Cake Addin
#addin nuget:?package=LazyApiPack.Localization&version=0.2.1.1

// Install LazyApiPack.Localization as a Cake Tool
#tool nuget:?package=LazyApiPack.Localization&version=0.2.1.1                

About this project

This project provides interfaces, to use the Localization Manager in MVVM Service patterns.

Localization Interface

Supports functions GetTranslation

  • GetTranslation(group, id) Gets the localization from the Group with the Id (See file structure).
  • SetTranslation(group, id, value) Sets or updates the localization in the specified Group with the Id.

Localization File Structure

The localization file has a header with the following attributes

  • ModuleId: Specifies the unique name of the module this localization file supports
  • IsDefault: If the module does not support the selected language, this file is used instead (Usually english)
  • Priority: You can write localization files for modules that are already translated. If you want to override existing localizations in other modules, you can set a higher priority to use your translations instead
  • LocalizedLanguageName: The name of the language in the native language (eg. Norsk (Bokmål))
  • DefaultLanguageName: The name of the language in the default language (Usually in english)
  • LanguageCode: The code for the localization (de, en, etc.) Note: en-US is a different language than en-UK, so the language files will not be mixed but the default localization file is selected if the module does not explicitly supports en-US
  • IsRightToLeft: Indicates, if the language should be written from right to left (eg. Hebrew or Arabic)

Localizations

The following section "Localization" contains a dictionary of translations used in your program. The hierarchy is "Group" then "Id"

Example of a localization file

{
  "ModuleId": "AccountingModule",
  "LanguageCode": "en",
  "IsDefault": true,
  "Priority": 0,
  "DefaultLanguageName": "English",
  "LocalizedLanguageName": "English",
  "IsRightToLeft": false,
  "Translations": {
    "CaptionsAcc": {
      "SaveFileDialogCaption": "Save accounting file",
      "OpenFileDialogCaption": "Open accounting file"
    },
    "MessagesAcc": {
      "SaveFileDialogMessage": "Do you want to save the accounting file?",
      "OpenFileDialogMessage": "Do you want to open the accounting file?"
    }
  }
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on LazyApiPack.Localization:

Package Downloads
LazyApiPack.Localization.Manager

Provides a way to localize applications.

LazyApiPack.Localization.Wpf

Provides a way to use the LocaliationService within XAML files.

LazyApiPack.Mvvm

Provides an MVVM pattern for applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.1.1 260 11/19/2023
0.2.0 217 10/22/2023
0.1.0 212 7/16/2023
0.0.6 282 3/16/2023
0.0.5 283 3/13/2023
0.0.4 231 3/13/2023
0.0.3 230 3/13/2023
0.0.2 295 3/3/2023
0.0.1 312 3/3/2023

Support added for language files as Embedded Resources from Assemblies.