Giter Site home page Giter Site logo

lazziya / expresslocalizationsample Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 23.0 8.51 MB

Sample localization project based on original template from Asp.NetCore 2.2

Home Page: http://ziyad.info/en/articles/33-Express_Localization

License: MIT License

C# 69.18% HTML 29.89% CSS 0.79% JavaScript 0.15%

expresslocalizationsample's Introduction

UPDATE Nov. 2020 :

Do you want even more exciting localization experience? If yes, please check XLocalizer, a localization nuget with online translation support and auto resource creating.

ExpressLocalization Sample - Asp.Net Core 2.2

Fully localized project, based on the basic Asp.Net Core 2.2 template from Visual Studio, localized using LazZiya.ExpressLocalization.

DotNetCore version

This project is based on dotnetcore2.2, a newer project based on dotnetcore3.0 is available here: ExpressLocalization Sample for DotNetCore3.0

Features :

  • Custom (route value) RequestCultureProvider
  • Custom IHtmlStringLocalizer
  • Custom LocalizeTagHelper
  • Validating localized input fields e.g. (12,34 and 12.34)
  • Localization of:
    • Razor Views (All views locailzed with LocalizeTagHelper)
    • DataAnnotations
    • Model binding and model validation error messages
    • IdentityErrorDescriber messages
    • Client side validation error messages

Available Cultures

some cultures needs fixing/adding few translations

  • Arabic
  • Chinese
  • Czech
  • Dutch
  • English
  • French (thanks to @werddomain for fixing)
  • German
  • Hindi
  • Hungarian
  • Italian
  • Japanese
  • Korean
  • Persian
  • Polish
  • Portuguese
  • Portuguese Brazil (thanks to @ismaelgasparin for adding)
  • Russian (thanks to @InfDev for fixing)
  • Spanish
  • Swedish
  • Turkish
  • Ukrainian (thanks to @InfDev for adding)
  • Vietnamese

Project site:

http://ziyad.info/en/articles/33-Express_Localization

Step by step tutorial to build similar project

http://ziyad.info/en/articles/36-Develop_Multi_Cultural_Web_Application_Using_ExpressLocalization

TagHelpers

Some parts of this project is using LazZiya.TagHelpers like:

  • LanguageNav dropdown
  • Client side validation scripts
  • AlertTagHelper for bootstrap 4 alerts
  • Localization of razor views done with LocalizeTagHelper.

Contributers

Contributer Role
@LazZiya Owner
@ismaelgasparin Portuguese language

License:

MIT

expresslocalizationsample's People

Contributors

ismaelgasparin avatar lazziya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

expresslocalizationsample's Issues

Date in ExpressLocalizationResource.fr.resx

The date value in this field is set to 'Rendez-vous amoureux'. This in french meen like 'Your love date' Like if your are dating some one. The correct value is simply Date.

Backend messages with params args are not formatted

When using _loc.Text with params for formatting the messages, the string is not formatted.

var ss = _loc.Text("Please click <a href='{0}'>here</a>", url).Value;

// returns:
// Please click <a href='{0}'>here</a>

callbackUrl is not generated on user registration

callbackUrl is always null in Register.cshtml.cs:
var callbackUrl = Url.Page(
$"/{_culture}/Account/ConfirmEmail",
pageHandler: null,
values: new { userId = user.Id, code = code },
protocol: Request.Scheme);

Upgrade to fully use LocalizeTagHelper

LazZiya.TagHelpers.Localization offers an easy and html friendly way to localize raqzor views,
update all the files to be fully localized by LocalizeTagHelper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.