Skip to content

Multi-Language Issue #10

Description

@rmatherly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions