Problem getting localization working

Hi,

I am trying to get the localization of the Grid to work in a test project. When I navigate to my grid component I get a JS exception. Here is the console output:

blazor.server.js:1 [2020-05-22T11:26:13.409Z] Information: Normalizing '_blazor' to 'https://localhost:44318/_blazor'.
blazor.server.js:1 [2020-05-22T11:26:13.445Z] Information: WebSocket connected to wss://localhost:44318/_blazor?id=JKPAluxFqXI3x35H4Id7Kg.
blazor.server.js:15 [2020-05-22T11:26:17.447Z] Error: Microsoft.JSInterop.JSException: Unexpected token { in JSON at position 35526
SyntaxError: Unexpected token { in JSON at position 35526
    at JSON.parse (<anonymous>)
    at Object.load (https://localhost:44318/_content/Syncfusion.Blazor/scripts/syncfusion-blazor.min.js:1:153134)
    at https://localhost:44318/_framework/blazor.server.js:8:31421
    at new Promise (<anonymous>)
    at e.beginInvokeJSFromDotNet (https://localhost:44318/_framework/blazor.server.js:8:31390)
    at https://localhost:44318/_framework/blazor.server.js:1:19202
    at Array.forEach (<anonymous>)
    at e.invokeClientMethod (https://localhost:44318/_framework/blazor.server.js:1:19173)
    at e.processIncomingData (https://localhost:44318/_framework/blazor.server.js:1:17165)
    at e.connection.onreceive (https://localhost:44318/_framework/blazor.server.js:1:10276)
   at Microsoft.JSInterop.JSRuntime.InvokeWithDefaultCancellation[T](String identifier, Object[] args)
   at Syncfusion.Blazor.ResourceManager.SetJSCulture()
   at Syncfusion.Blazor.ResourceManager.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
e.log @ blazor.server.js:15
C @ blazor.server.js:8
(anonymous) @ blazor.server.js:8
(anonymous) @ blazor.server.js:1
e.invokeClientMethod @ blazor.server.js:1
e.processIncomingData @ blazor.server.js:1
connection.onreceive @ blazor.server.js:1
i.onmessage @ blazor.server.js:1
blazor.server.js:1 [2020-05-22T11:26:17.448Z] Information: Connection disconnected.

No idea what my mistake is but I can't get it to work. I uploaded a simplified example to GitHub:

Any help would be greatly appreciated.

Best regards
Alexander

3 Replies

VN Vignesh Natarajan Syncfusion Team May 25, 2020 08:49 AM UTC

Hi Alexander,  

Thanks for contacting Syncfusion support.  

Query: “In this test project I tried to implement the localization for Blazor Server Side, unfortunately without success!  

We are able to reproduce the reported issue in the provided sample. Since it is a known issue with existing resources files, we have fixed the issue and it will be refreshed online as soon as possible. Till then kindly use the modified de resource file from below 


For your convenience we have prepared a sample with modified SfResources.de.resx file which can be downloaded from below  


Please get back to us if you need further assistance. 

Regards, 
Vignesh Natarajan 
 



AS Alexander Schröders May 25, 2020 06:08 PM UTC

Thank you very much for your reply. With the update resource file I don't get any error running this.
My problem now is that I don't get the translatet strings in the application. I set a breakpoint in the sample you send and I when I set a breakpoint in the Get Method of the "SyncfusionLocalizer" class it is never hit. Is there anything else that needs to be configured? 

Best regards
Alexander


RN Rahul Narayanasamy Syncfusion Team May 26, 2020 03:00 PM UTC

Hi Alexander, 

Thanks for the update. 

We have validated your query and we suspect that the localization changes are not applied to Grid at initial rendering. If you are currently facing the same issue at your end, then we have considered this as a defect “Server side Localization not working in initial Grid rendering” and logged a defect report for the same. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming 2020 Volume 2 Main Release which is expected to be rolled out in the month of June.  

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  


If you are facing any other issues, then could you please share the video demonstration of the issue. It will be helpful to validate the problem further. 

Regards, 
Rahul 


Loader.
Up arrow icon