Skip to content

Commit c0a39db

Browse files
docs(common): localization service error with missing services
1 parent 6337d65 commit c0a39db

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

troubleshooting/general-issues.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@ position: 1
1212

1313
This page provides solutions for common issues you may encounter while working with Telerik UI for Blazor components.
1414

15+
16+
<!-- Start Document Outline -->
17+
1518
* [Popups Do Not Work](#popups-do-not-work)
1619
* [Wrong Popup Position](#wrong-popup-position)
1720
* [Unable to find package Telerik.Documents.SpreadsheetStreaming](#unable-to-find-package-telerikdocumentsspreadsheetstreaming)
21+
* [Cannot provide a value for property 'Localizer'](#cannot-provide-a-value-for-property-localizer)
22+
23+
<!-- End Document Outline -->
1824

1925

2026
## Popups Do Not Work
@@ -77,6 +83,21 @@ The most common reasons and solutions for seeing this error (being unable to res
7783
* There is an issue with connecting to our online feed. For example, a firewall, network downtime or wrong credentials are used. Check the [Troubleshooting NuGet Feed Issues]({%slug installation/nuget%}#troubleshooting) section of the documentation to see how to handle that.
7884

7985
* There is a mismatch between the versions available for restore and the referenced versions, while the Visual Studio "treat warnings as errors" setting is turned on. This can happen if one version is referenced, but another is available (for example, only certain versions are available in a custom local feed for the [Document Processing]({%slug common-features-dpl%}) packages, but the main package references an older version). In such cases, the tooling would usually resolve the newest version, but it will show a warning and VS can treat it as an error and not let you build. The solution is to check the version that is referenced by `Telerik.UI.for.Blazor` and ensure you can access that. Cleaning the solution, manually restoring the packages and re-building can also help.
86+
87+
88+
89+
## Cannot provide a value for property 'Localizer'
90+
91+
If you get an error similar to this one:
92+
93+
>warning `InvalidOperationException: Cannot provide a value for property 'Localizer' on type 'Telerik.Blazor.Components.TelerikMenu[[TelerikBlazorApp1.Models.MenuItem, TelerikBlazorApp1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]'. There is no registered service of type 'Telerik.Blazor.Services.ITelerikStringLocalizer'.`
94+
95+
There can be two common causes for the problem:
96+
97+
* The Telerik services are not registered on the app, a line similar to `services.AddTelerikBlazor();` is missing. You can read more about where you need to add that in the [What You Need - Project Configuration]({%slug getting-started/what-you-need%}#project-configuration) article section.
98+
99+
* The application uses localization, or there is a code snippet that does (e.g., a grid with custom buttons that are localized, copied over from another place), but the current app does not provide the necessary project-specific service. You can read more about implementing one in the [Localization]({%slug globalization-localization%}) article.
100+
80101

81102
## See Also
82103

0 commit comments

Comments
 (0)