Enable Localization in Blazor WebAssembly with Prerendering

Hi guys, I have a Blazor WebAssembly hosted application with .net core 6, and I enabled localization following the syncfusion documentation and everything works perfect.

But now I am enabling prerendering in the application and and now I am getting errors due to localization:

Error: Could not find 'cultureInfo.get' ('cultureInfo' was undefined).

I tried to add localization services on the server, but the error persist.

It is possible to add localization when prerendering the application?


Thanks


3 Replies

DR Deepak Ramakrishnan Syncfusion Team December 3, 2021 05:34 PM UTC

Hi Luis, 
 
Greetings from Syncfusion support. 
 
We have validated the reported issue and we suspect that you are trying to invoke the method before the scripts get loaded in the application. As per the screenshot the mention method is added in index.html file to get / set the culture of the browser . Also ensure whether the method is added to the respective file as mentioned in the documentation. 
 
[Snapshot] 
 
 
 
 
 
Thanks, 
Deepak R. 
 



LR Luis Roberto December 6, 2021 04:16 PM UTC

Ih Deepak, thank you very much, you we're right, when I move my index.html to the server in order to prerendering it, I fortog to add the method.


Thank you very much.




DR Deepak Ramakrishnan Syncfusion Team December 7, 2021 08:51 AM UTC

  
Hi Luis, 
  
Thanks for your update. 
  
We are glad that your requirement has fulfilled at your end. We are always happy to assist you if you need any further assistance. 
  
Thanks, 
Deepak R. 
 


Loader.
Up arrow icon