XperienceCommunity.Localization 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package XperienceCommunity.Localization --version 1.0.6                
NuGet\Install-Package XperienceCommunity.Localization -Version 1.0.6                
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="XperienceCommunity.Localization" Version="1.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XperienceCommunity.Localization --version 1.0.6                
#r "nuget: XperienceCommunity.Localization, 1.0.6"                
#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 XperienceCommunity.Localization as a Cake Addin
#addin nuget:?package=XperienceCommunity.Localization&version=1.0.6

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

XperienceCommunity.Localization

CI: Build and Test Localization NuGet Package

Description

This project enables creating and using localizations and translations in Xperience by Kentico project. Create translations in Xperience admin UI or programatically and use in your pages.

Screenshots

Administration localization edit form Administration translation edit form Administration key listing page Administration translation listing page

Library Version Matrix

Xperience Version Library Version
>= 28.4.3 1.0.0

Dependencies

Package Installation

Add the package to your application using the .NET CLI

dotnet add package XperienceCommunity.Localization

Quick Start

  1. Add this library to the application services.

    // Program.cs
     builder.Services.AddNittinLocalization();
    
  2. Create a localization key in Xperience's Administration within the Localization application added by this library. Administration localization edit form

  3. Create a translation for this key in Xperience's Administration within the Localization application added by this library. Administration translation edit form

  4. Display the results on your site with a ViewComponent.

    
    // ViewModelLocalizedWidgetViewComponent.cs
    private readonly IKenticoStringLocalizer localizer;

    public ViewModelLocalizedWidgetViewComponent(IKenticoStringLocalizer localizer)
        => this.localizer = localizer;

    public IViewComponentResult Invoke()
    {
        var model = new ViewModelLocalizedWidgetViewModel
        {
            Title = localizer["Title"],
            Content = localizer["Content"]
        };

        return View("~/Components/Widgets/ViewModelLocalizedWidget/_ViewModelLocalizedWidget.cshtml", model);
    }

Administration string localizer example

  1. Or display the results on your site with a Razor View 👍

@using XperienceCommunity.Localization

@inject IKenticoHtmlLocalizer localizer

<div>
    <h1>@localizer["Title"]</h1>
    <p>@localizer["Content"]</p>
</div>

Administration html localizer example

Contributing

Instructions and technical details for contributing to this project can be found in Contributing Setup.

License

Distributed under the MIT License. See LICENSE.md for more information.

Support

This project has Limited support.

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.1 163 10/18/2024
1.4.1-pre.9c79180 75 10/18/2024
1.4.1-pre.782df4b 71 10/18/2024
1.4.1-pre.501b2b6 68 10/18/2024
1.2.2 240 7/11/2024
1.2.2-pre.e63914d 71 10/18/2024
1.2.2-pre.95a5373 37 7/11/2024
1.2.2-pre.8fa780a 51 7/11/2024
1.2.2-pre.614044a 67 10/18/2024
1.2.2-pre.2a9f442 69 10/18/2024
1.2.2-pre.107ba0f 35 7/11/2024
1.2.1 85 7/11/2024
1.2.1-pre.db6a0d4 50 7/11/2024
1.2.1-pre.8fa780a 48 7/11/2024
1.1.1 329 5/15/2024
1.1.1-pre.5b89503 52 5/14/2024
1.1.1-pre.2aea3c9 39 7/11/2024
1.0.7-pre.bb77ad6 56 5/14/2024
1.0.7-pre.903c108 59 5/14/2024
1.0.6 105 5/14/2024
1.0.6-pre.bb77ad6 51 5/14/2024
1.0.4 98 5/14/2024
1.0.4-pre.5b89503 45 5/14/2024