Forum Discussion

iXeeshanTahir's avatar
iXeeshanTahir
Copper Contributor
Feb 15, 2022

Hub Site Translation not working when switching to another language

We have a hub site with navigation enabled and also MUI setup for Arabic language. Each item in the menu has the translations. When user switches from English To Arabic, the whole UI experience changes except the Navigation. Changing the language requires the users to clear the browser Cache which is not a good experience. Even Ctrl + F5 do not helped here.

 

Is there any way to force clear cache or force my portal to reload changed MUI Navigation?

 

Environment: SharePoint Online with SPFX React

  • So, after weeks of trying different approaches, I was finally able to achieve this with some custom piece of code.

    The problem here is that SharePoint Online stores the Hub navigation in browser cache. A database called ODSP_DB is holding the navigation nodes. Users cannot see the navigation updates unless they clear browser cache (which eventually refreshes the database) or logout and login to the system.

    To overcome this issue, you have to clean the DB with custom JS Code and unregister a service worker from the browser, which actually forces the browser to rebuild the ODSP_DB and the navigation nodes.

    I have placed the sample code on my blog. May be it will help someone until a proper way is announced by Microsoft.

    http://fixingsharepoint.blogspot.com/2022/11/sharepoint-online-hub-navigation-not.html

Resources