Is there any way I can restrict my web application to certain cultures? So that .Net determines culture automatically, but the choice is restricted to these cultures.
For example, I would like to support only ‘en-us’ and ‘it’, so all other ‘en’ language clients will automatically be assigned ‘en-us’ culture.
UPDATE. I know how to set the thread culture, and I know how to determine the clients culture and then set the culture based on the clients ‘base’ culture (like set ‘en’ for all clients with ‘en-xx’ culture. I just want to do it properly.
Basically, I want to know how to limit the scope of cultures that is used to determine the culture when using culture=”auto”.
You can set EN culture as a default one providing locales for more specific ones, like en-uk, en-us, etc. only if needed.
That won’t help for other cases of subcultures. But is there a need for these cases?
Update.
I also found full resource fallback sequence here at Rick Strahl’s blog (look for Resource Fallback header:
So not only you can provide default resource, you can specify default resource for generic language.