AJAX Control Toolkit - Globalization (Language)

Posted by Guilherme Cardoso on Geeks with Blogs See other posts from Geeks with Blogs or by Guilherme Cardoso
Published on Tue, 25 May 2010 15:03:05 GMT Indexed on 2010/05/25 16:11 UTC
Read the original article Hit count: 458

Filed under:

For those who use AjaxToolKit controls presenting a language-dependent data (the CalendarExternder with the names of the months and weeks, for example) you can change the language to be presented in a simple way.

In Web.Config let's define the primary culture as follows:

 < system . web > <System. Web> 
 < globalization uiCulture = "pt-pt" culture = "pt-pt" /> <Globalization UICulture = "en-us" culture = "en-us" /> 
 ... ... 


 In this example I'm using Portuguese.
To finish it is necessary to change our ScriptManager. Be it the ToolScriptManager AjaxToolKit or belonging to the ScriptManager's framework. NET, the properties as a vibrant and true are the EnableScriptGlobalization EnableScriptLocalization.

 < cc1 : ToolkitScriptManager ID = "ToolkitScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true" > <Cc1: ToolkitScriptManager ID = "ToolkitScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true"> 
 </ cc1 : ToolkitScriptManager > </ Cc1: ToolkitScriptManager> 

 or 

 < asp : ScriptManager ID = "ScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true" > <Asp: ScriptManager ID = "ScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true"> 
 </ asp : ScriptManager > </ Asp: ScriptManager> 


  Like hus we use the controls on AjaxToolKit, always using the Portuguese language.

It is important that AjaxTookKit is updated to avoid shortages or errors in translation, though I have not updated by this error in the ModalPopup the latest version, and any controls that I have used are translated correctly.

© Geeks with Blogs or respective owner