Hi @marcelgo,
You can roughly follow this guide to do what you want: https://documentation.onesignal.com/docs/wordpress#section-customizing-wordpress-plugin-behavior.
In that section above, follow the second bullet point (Never initialize OneSignal automatically, manually initialize OneSignal on target pages using client-sided JavaScript) and ignore the first bullet point.
The code you can use will be similar to:
function getCustomizedNotifyButtonTextByVisitorLanguage() {
if (navigator.language === 'en-US') {
window._oneSignalInitOptions.notifyButton.text['tip.state.unsubscribed'] = 'Subscribe to notifications';
} else if (navigator.language === 'ja-JP') {
window._oneSignalInitOptions.notifyButton.text['tip.state.unsubscribed'] = '通知を購読する';
}
}
window.OneSignal = window.OneSignal || [];
/* Why use .push? See: https://stackoverflow.com/a/38466780/555547 */
window.OneSignal.push(function() {
/* Set notify button language text, see https://documentation.onesignal.com/docs/web-push-prompts#section-customize-subscription-bell */
window._oneSignalInitOptions.notifyButton.text = getCustomizedNotifyButtonTextByVisitorLanguage();
/* Never call init() more than once. An error will occur. */
window.OneSignal.init(window._oneSignalInitOptions);
});