Displaying Notices Based on Browser Language Preferences
You can display privacy notice content in the user's preferred language by passing it as a third parameter. This ensures the notice aligns with the language configured in the user's browser settings. To do this, you must modify the SDK script to integrate the privacy notice, allowing it to detect the browser language and automatically select the corresponding option in the dropdown. Use this method to fetch notice content in the preferred language:
OneTrust.NoticeApi.LoadNotices([noticeurl], trackNoticeLoad, languageCode)
-
The
noticeurlrepresents the notice json url available as part of the integration SDK. -
trackNoticeLoadis a boolean to decide if the notice loaded by the users should be tracked in the Locations tab on the Privacy Notice Details screen. -
The
languageCodeis the preferred language code used to fetch notice content. This parameter can be utilized to pass on the language code by getting the preferred language using navigator.language.
If the preferred language is not setup in the Privacy Notice Management product, the SDK script will take care of loading the notice in the default language.