FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

marmind/IdentityServer3.Contrib.Localization.UI: Localize IdentityServer3 UI · GitHub

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();
var embeddedViewServiceConfig = new DefaultViewServiceOptions();
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
ar.po -> Arabic

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.

About

Localize IdentityServer3 UI

Resources

Stars

1 star

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL