Version

Localize Multi Day Event Banner Caption

Before You Begin

The WebScheduleInfo™ component’s EnableMultiDayEventArrows property allows you to display arrows labeling date an event occurs "from" and the date it occurs "to".

WebScheduleGenericDataProvider Localize Multi Day Event Banner Caption 01.png

These labels are available for the WebDayView™ and WebMonthView™ controls. If you need to localize these labels, you can use the following two properties:

You should be familiar with how to set up the WebSchedule controls and components on your webpage.

What You Will Accomplish

You will learn how to localize WebDayView’s multiday event labels for Spanish-speaking locales.

Follow these Steps

  1. Create an ASP.NET WebSite.

  2. Set up WebDayView on the page. For more information on this, see Using WebSchedule Controls Quick Design

  3. Right-click the project in the Solution Explorer and select Add New Item.

  4. Select Resource File in the dialog box that appears.

  5. Click Add.

  6. Accept the prompt to add the Resource file to the App_GlobalResources folder.

  7. Open the Resource file.

  8. Define the resource names and values for the multiday event arrows, with the names being WebDayView1Resource1_MultiDayEventFromArrowCaption and WebDayView1Resource1_MultiDayEventToArrowCaption, and the values being From and To, respectively.

WebScheduleGenericDataProvider Localize Multi Day Event Banner Caption 02.png
  1. Make a copy of the Resource file and rename it to Resource.es-Es.resx to define the resource file for Spanish-speaking locales.

  2. Define the values in Spanish with the values being de and a.

WebScheduleGenericDataProvider Localize Multi Day Event Banner Caption 03.png
  1. Set UICulture and Culture to "auto" in the page directive.

In HTML:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BindingtoDataSourceControl.aspx.cs" Inherits="BindingtoDataSourceControl" UICulture="Auto" Culture="Auto" %>
  1. In the page load event, set WebDayView to use the definition from the Resource file for the From and To labels.

In Visual Basic:

Me.WebDayView1.MultiDayEventFromArrowCaption = GetGlobalResourceObject("Resource", "WebDayView1Resource1_MultiDayEventFromArrowCaption").ToString()
Me.WebDayView1.MultiDayEventToArrowCaption = GetGlobalResourceObject("Resource", "WebDayView1Resource1_MultiDayEventToArrowCaption").ToString()

In C#:

this.WebDayView1.MultiDayEventFromArrowCaption = GetGlobalResourceObject("Resource", "WebDayView1Resource1_MultiDayEventFromArrowCaption").ToString();
this.WebDayView1.MultiDayEventToArrowCaption = GetGlobalResourceObject("Resource", "WebDayView1Resource1_MultiDayEventToArrowCaption").ToString();
  1. Run the application. In browsers that are set up to use the Spanish language, the multiday event arrows will be displayed in Spanish.

WebScheduleGenericDataProvider Localize Multi Day Event Banner Caption 04.png