Showing results for 
Search instead for 
Do you mean 

Is there a way to force a specific language in Geospatial Portal?

by Technical Evangelist on ‎02-09-2018 02:53 AM (345 Views)


Is there a way to force a specific language in Geospatial Portal? By default, Portal uses the language of the browser.


There's no such functionallity out of the box in Portal but this can be solved with a small customization.

Administrator must modify all ASPX files that are expected to be used by users, adding this code just after the <head> element:

<head runat="server">
<script runat="server" language="C#">
   protected new void InitializeCulture()
      if (Request.Cookies["lngCode"] != null && Request.Cookies["lngCode"].Value != null && Request.Cookies["lngCode"].Value != "")
         // either keep the language manually selected by user (saved in a cookie)
         System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(Request.Cookies["lngCode"].Value);
         System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Request.Cookies["lngCode"].Value);
         // or use default language
         System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("da-DK");
         System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("da-DK");
  • Example above will force usage of Danish language but still will take into consideration user selected language.
  • The language selection is held in a web browser cookie.