2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
You can localize the custom strings (All Day, No Events) used in the schedule control month inline view from PCL without changing locale in device. It can be achieved by providing the custom strings to the specific language resx file and handling the required culture with the locale using DependencyService instead of device language. In the below code, we have set French as Schedule locale as well as custom strings.
Step 1: Sample changes, setting locale
Step 2: Adding resx file in pcl
You need to add the required resx files under the Resources folder in the PCL project and the filename should be Syncfusion.SfSchedule.Forms.LanguageCode.resx. Example: For French, Syncfusion.SfSchedule.Forms.fr.resx Now, set the Build Action as EmbeddedResource for Syncfusion.SfSchedule.Forms.fr.resx file and Build Action as Compile for Syncfusion.SfSchedule.Forms.fr.Designer.cs file.
Step 3: Adding ILocalize interface in PCL
You need to add the ILocalize interface to convert the platform-specific locales to a value supported in .NET cultures in the PCL project.
Step 4: Adding Localize class in Android and iOS project inheriting from ILocalize
You need to add the Localize class in Android and iOS project by inheriting from ILocalize. You can get the CultureInfo and set the same to Schedule Locale by using GetCurrentCultureInfo and SetLocale.
Localize class for Android project,
[c#]
Localize class for iOS project,
You can download the entire source code of this demo for Xamarin.Forms from
|
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.