Archive

Posts Tagged ‘change language’

Change default language for AD FS 2.0

August 13th, 2013 1 comment

ADFS deafult changes language of its pages based on language sent from user’s browser. User’s browser sends http header called Accept-Lanaguage. This means that if, for examle, user with Regional settings set to Slovak accesses ADFS website, all pages are in Slovak language. When someone else comes with Regional settings set to English, all pages are in English language.

There was a need for one ADFS portal I implemented to change ADFS websites’ language to one static language – Slovak (multilanguage option shoule be set off). I digged into ADFS files stored deafult at C:\inetpub\adfs\ls\. After couple minutes I found file called Global.asax.cs which contained something about languages. After coulpe minutes trying to understand .NET I figured out what have to be done to change language to Slovak.

On line number 45 I found following line:

string requestedLang = acceptlang;

I changed this line to:

string requestedLang = "sk"

Since then everything works only in Slovak language. Just a remark: if you are using ADFS Proxy you have to change this settings on ADFS Proxy server. It doesn’t have to be changed on ADFS server (non-proxy).