Calendar/DateTimePicker localization

Modified: 2009/09/29 12:58 by janblo - Categorized as: Tutorials
Edit

Introduction

From Gaia Ajax 3.6 - You can localize the DateTimePicker/Calendar and other controls by adding the resx files directly to the App_GlobalResources folder of your ASP.NET site

Both Gaia Calendar and DateTimePicker support localization. Localization is done based on control properties and satellite assemblies.

The following MSDN article explains howto create sattelite assemblies
Edit

Sample

This step-by-step guide demonstrates how to localize Calendar/DateTimePicker to French (fr-fr).

  • Create text file named Gaia.WebWidgets.Extensions.Resources.Calendar.fr-fr.txt
  • Populate the newly created text file with key/value pairs as follows:
    • Today=Aujourdhui
    • Close=Fermer
  • Open Visual Studio Command Prompt
    • Typically located at Start->Microsoft Visual Studio 2005->Visual Studio Tools
  • Run resgen.exe Gaia.WebWidgets.Extensions.Resources.Calendar.fr-fr.txt
  • Verify that the resource file was created
  • Run al.exe /embed:Gaia.WebWidgets.Extensions.Resources.Calendar.fr-fr.resources /c:fr-fr /out:Gaia.WebWidgets.Extensions.resources.dll
  • Verify that the dll file was created
  • Set the Culture on the DateTimePicker or Calendar to (fr-fr) and copy the assembly over to the bin folder of your application.

Now Calendar/DateTimePicker should be localized to French!

Attached is a zip file containing a text file and batch script to automate the process of creating the resource dll you can drop into the solution. Don't forget to open the VS.NET Command Prompt to properly locate the al and resgen tools.

ScrewTurn Wiki version 2.0.33. Some of the icons created by FamFamFam.