Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localizing Today text in ajaxToolkit:CalendarExtender?

Is there any way to localize the Today text in ajaxToolkit:CalendarExtender?

This control localizes the day and month texts according to the culture but shows, the current date with the text Today like Today:noienbrie 20, 2009, here the month is localized but today is still in English.

Please help me as i tried the internet but haven't found any way so far.

like image 621
Embedd_0913 Avatar asked Nov 20 '09 05:11

Embedd_0913


2 Answers

"Today" is definitely localized in the Ajax Control Toolkit - it sounds like you are missing a satellite resource assembly.

If you have downloaded the binary distribution then in the folder where AjaxControlToolkit.dll is found (release or debug, not sure which), you should also see a whole bunch of directories named according to culture code, such as fr, zh-CHT, ja, and so on, each one containing AjaxControlToolkit.resources.dll.

You need to copy the language folders you want to your website's bin directory so that the resources will be loaded and used by the .NET runtime for the matching culture.

If you are just referencing AjaxControlToolkit.dll directly, you won't get the resource assemblies you need automatically, you have to manually include the ones you actually want.

like image 150
Sam Avatar answered Sep 27 '22 22:09

Sam


In order to translate "Today" you must add the following attributes:

<%@ Page ... Culture="pt-PT" UICulture="pt-PT" %>

<asp:ToolkitScriptManager ... EnableScriptGlobalization="true" EnableScriptLocalization="true"></asp:ToolkitScriptManager>
like image 23
Diogo Cardoso Avatar answered Sep 28 '22 00:09

Diogo Cardoso