Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net mvc where to set default culture?

For multilingual asp.net mvc web site.

Where should i set thread's culture to default language (which is tr-TR for my case), in addition i need to save this in cookie if it does not exists. in Application_Start() or else ?

I have multiple sites(domains), so i need to change default language site specific.

 example.com must set default culture to tr-TR
 example2.com must set default culture to en-US
like image 856
Can Avatar asked Sep 16 '15 07:09

Can


1 Answers

Try it setting in web.config

<configuration>
    <system.web>
        <globalization uiCulture="en-GB" culture="en-GB" />
    </system.web>
</configuration>

this is a more generic way to set the culture...

like image 129
Nishant Singh Avatar answered Nov 11 '22 16:11

Nishant Singh