When users visit your website, they typically encounter two prompts for web push notifications:
- Pushwoosh Pre-permission Prompt: This is an initial prompt displayed by the Pushwoosh SDK. It appears before the browser's native permission request. The standard Pushwoosh pre-permission prompt uses a single language for all users.
- Browser-Native Permission Prompt: This prompt is displayed directly by the user's web browser (e.g., Chrome, Firefox) asking for their explicit permission to send notifications. The language of this browser-native prompt is determined by the user's browser or operating system language settings and cannot be customized by Pushwoosh.
To display the Pushwoosh pre-permission prompt in different languages, corresponding to the language versions of your website (e.g., showing an English prompt on /en
pages and a Spanish prompt on /es
pages), you should implement a custom subscription widget.
Here's why a custom subscription widget is the recommended solution:
- Full Control: Because the custom widget is part of your website's code, you have complete control over its text, appearance, and behavior.
-
Dynamic Language Display: You can program the widget to detect the current language of your website (for example, based on the URL path like
/en/
,/es/
, or user language preferences stored on your site) and display the prompt text in that specific language. - Single Project: This localization can be achieved within a single Pushwoosh project. You do not need to create multiple projects for different languages.
By implementing a custom subscription widget, you can provide a consistent and user-friendly language experience when asking users to subscribe to web push notifications.
For detailed instructions on how to implement a custom subscription widget, please refer to our developer documentation: Custom Subscription Widget Guide
Comments
0 comments
Please sign in to leave a comment.