You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: maui-toolkit/Calendar/localization.md
+35-2Lines changed: 35 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,24 +11,57 @@ documentation: ug
11
11
12
12
By default, the calendar control supports US English localizations. You can change to other languages by adding the `Globalization` namespace to your application.
13
13
14
+
## Setting CurrentUICulture to the application
15
+
14
16
The application culture can be changed by setting `CurrentUICulture`. in the `App.xaml.cs` file.
//// For example : SfCalendarResources.ResourceManager = new ResourceManager("MauiTestCalendarLocalization.Resources.SfCalendar", Application.Current.GetType().Assembly);
SfCalendarResources.ResourceManager = new ResourceManager("ResxPath", Application.Current.GetType().Assembly);
35
+
MainPage = new AppShell();
28
36
}
29
37
}
30
38
31
39
{% endhighlight %}
32
40
{% endtabs %}
33
41
34
42

43
+
44
+
N>
45
+
The required `resx` files with `Build Action` as `EmbeddedResource` (File name should contain culture code) into the `Resources` folder.
46
+
47
+
## Localize application level
48
+
49
+
To localize the `Calendar` based on `CurrentUICulture` using `resource` files, follow the below steps.
50
+
51
+
1. Create new folder, named as `Resources` in the application.
52
+
53
+
2. Right-click on the `Resources` folder, select `Add` and then `NewItem.`
54
+
55
+
3. In Add New Item wizard, select the Resource File option and name the filename as `SfCalendar.<culture name>.resx.` For example, give the name as `SfCalendar.ja-JP.resx` for French culture.
56
+
57
+
4. The culture name indicates the name of the language and country.
0 commit comments