-
Notifications
You must be signed in to change notification settings - Fork 162
Languages & cultures explained
If you build an application using the AuthP library, then by default any of the messages and errors from the AuthP services will be in generic English. But since AuthP version 4.1.0 you can can either:
- Change the messages / errors coming from the internal code into another language.
- Or if your application is used in multiple countries you can support many languages.
.NET refers to supporting many languages as localization and alongside localization is globalization, which is about input and displaying data in the right format (e.g. date formats). Both the localization and globalization are controlled by the culture of the user or application, for instance the culture with a Name
of "en-US" is American English with the "Color" spelling and a date format of "month/day/year". See this Microsoft document about all these concepts.
Version 4.1.0 of AuthP library has a built-in localization system, which is turned off by default. This means you can use the AuthP library using English without having to set up the .NET localization services, which isn't a quick thing to set up. Had to do some 'magic' so that the NuGet works normally and you only have to setup the .NET localization if you want extra languages. That means you can use or upgrade to the 4.1.0 without any more work (unless you want to add / change the languages).
This 'magic' is provided by a my library, called Net.LocalizeMessagesAndErrors. You might like to read this article which explains more about .NET localization and why I created this new library to make localization work in the AuthP library.
But if you want replace the English messages with a different language or support many languages in your application, then you need to set up the .NET localization and the AuthP localization. This is detailed in the Usages -> Supporting multiple languages document.
Also, I have altered the Example1 ASP.NET Core app using the new library to support both the normal English and a French version of the AuthP's services, plus some of the frontend to show English or French depending on the set culture. The figure below shows the same view in English and French, especially note that the red error message came from the AuthP's Roles admin code.
- Intro to multi-tenants (ASP.NET video)
- Articles in date order:
- 0. Improved Roles/Permissions
- 1. Setting up the database
- 2. Admin: adding users and tenants
- 3. Versioning your app
- 4. Hierarchical multi-tenant
- 5. Advanced technique with claims
- 6. Sharding multi-tenant setup
- 7. Three ways to add new users
- 8. The design of the sharding data
- 9. Down for maintenance article
- 10: Three ways to refresh claims
- 11. Features of Multilingual service
- 12. Custom databases - Part1
- Videos (old)
- Authentication explained
- Permissions explained
- Roles explained
- AuthUser explained
- Multi tenant explained
- Sharding explained
- How AuthP handles sharding
- How AuthP handles errors
- Languages & cultures explained
- JWT Token refresh explained
- Setup Permissions
- Setup Authentication
- Startup code
- Setup the custom database feature
- JWT Token configuration
- Multi tenant configuration
- Using Permissions
- Using JWT Tokens
- Creating a multi-tenant app
- Supporting multiple languages
- Unit Test your AuthP app