Coder Social home page Coder Social logo

osmanmelsayed / identityserver3.contrib.localization.ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marmind/identityserver3.contrib.localization.ui

0.0 0.0 0.0 3.97 MB

Localize IdentityServer3 UI

License: MIT License

C# 38.01% HTML 55.06% PowerShell 6.68% ASP 0.25%

identityserver3.contrib.localization.ui's Introduction

IdentityServer3.Contrib.Localization.UI

Per default all views of IdentityServer3 are not localized and in English. This solution provides a LocalizedViewLoader that can be used to load all views with translations. This implementation is based on the FileSystemWithEmbeddedFallbackViewLoader but with translation capabilities.

Install

Build the solution and include the resulting assembly. Place the directories assets and resources into the root directory of your application. Be sure to set Copy to Output Directory to Copy if newer. All files are loaded into an internal cache after startup, so restart after changing views or language files.

var factory = new IdentityServerServiceFactory();
factory.ViewService = new Registration<IViewService>(
    resolver => new DefaultViewService(embeddedViewServiceConfig, new LocalizedViewLoader()));

The LocalizedViewLoader takes a paramter directory to override the default view directory which is assets.

Language files

We use PO files as language files. The name of the file defines the culture:

de.po -> German
de-AT -> German, Austria

If the requested language could not be found, the culture en will be searched, so be sure that this one exists.

For further information how IdentityServer3 works, see Customizing Views.

identityserver3.contrib.localization.ui's People

Contributors

norberteder avatar osmanmelsayed avatar petr-k avatar

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.