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
We have a site that has 6 language versions. We found that when the site was accessed with a context language other than English, the mobile detection did not work. This is because the GetRulesDevice method uses the context language, but the Device items only have English versions. In other languages, no devices are returned and the mobile detection fails. I was able to fix this by updating the GetRulesDevice method to change the Context.Language to English before retrieving the device list and change it back to whatever it was afterward.
We have a site that has 6 language versions. We found that when the site was accessed with a context language other than English, the mobile detection did not work. This is because the GetRulesDevice method uses the context language, but the Device items only have English versions. In other languages, no devices are returned and the mobile detection fails. I was able to fix this by updating the GetRulesDevice method to change the Context.Language to English before retrieving the device list and change it back to whatever it was afterward.
I created a Fork with my changes: https://github.com/rmatherly/Sitecore-Mobile-Device-Detector. There may be a way to improve on this or make it configurable, but it solved the issue for me, so I wanted to share it.
The text was updated successfully, but these errors were encountered: