You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per default all views of [IdentityServer3](https://github.com/IdentityServer/IdentityServer3"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.
4
+
5
+
## Install
6
+
7
+
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.
8
+
9
+
var factory = new IdentityServerServiceFactory();
10
+
factory.ViewService = new Registration<IViewService>(
11
+
resolver => new DefaultViewService(embeddedViewServiceConfig, new LocalizedViewLoader()));
12
+
13
+
The `LocalizedViewLoader` takes a paramter `directory` to override the default view directory which is `assets`.
14
+
15
+
## Language files
16
+
17
+
We use PO files as language files. The name of the file defines the culture:
18
+
19
+
de.po -> German
20
+
de-AT -> German, Austria
21
+
22
+
If the requested language could not be found, the culture `en` will be searched, so be sure that this one exists.
23
+
24
+
For further information how IdentityServer3 works, see [Customizing Views](https://identityserver.github.io/Documentation/docs/advanced/customizingViews.html"Customizing Views").
0 commit comments