Articles in this section
Category / Section

How to add new languages in SfCalendar control

1 min read

How to add new languages to SfCalendar control

 

Localization of SfCalendar can be changed by using 'Locale' property in Xamarin.Forms. You can change by passing the Culture name of language to this property.

 

Setting Localization in Xamarin.Forms:

 

 

public partial class LocaleFormsPage : ContentPage
    {
        public LocaleFormsPage()
        {
            InitializeComponent();
            SfCalendar sfCalendar = new SfCalendar();
            sfCalendar.Locale = new System.Globalization.CultureInfo("zh-CN");
            this.Content = sfCalendar;
        }
    }

 

 

 

Setting Localization in Xamarin.Android:

 

 

public class MainActivity : Activity
    {
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SfCalendar sfCalendar = new SfCalendar(this);
            sfCalendar.Locale = new Java.Util.Locale("zh-CN");
            SetContentView(sfCalendar);
        }
    }

 

 

 

 

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment