• Hi,
    thanks for such a good plugin. Lightweight and functional. Everything I like about it.

    would it be possible to internationalize the template, so WPML-like plugins can detect the strings?
    I have to update manually the “notification-bar-template” every time to replace this portion:

    <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <div class="wpfront-message">
                            <?php echo $this->options->message(); ?>
                        </div>
                        <div>
                            <?php if ($this->options->display_button()) { ?>
                                <?php if ($this->options->button_action() == 1) { ?>
                                    <a class="wpfront-button" href="<?php echo $this->options->button_action_url(); ?>"  target="<?php echo $this->options->button_action_new_tab() ? '_blank' : '_self'; ?>"><?php echo $this->options->button_text(); ?></a>
                                <?php } ?>
                                <?php if ($this->options->button_action() == 2) { ?>
                                    <a class="wpfront-button" onclick="javascript:wpfront_notification_bar_button_action_script();"><?php echo $this->options->button_text(); ?></a>
                                <?php } ?>
                            <?php } ?>
                        </div>
                    </td>
                </tr>
            </table>

    with:

    <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td>
                        <div class="wpfront-message">
                            <?php _e($this->options->message(), 'my-domain'); ?>
                        </div>
                        <div>
                            <?php if ($this->options->display_button()) { ?>
                                <?php if ($this->options->button_action() == 1) { ?>
                                    <a class="wpfront-button" href="<?php _e($this->options->button_action_url(), 'my-domain'); ?>"  target="<?php echo $this->options->button_action_new_tab() ? '_blank' : '_self'; ?>"><?php echo $this->options->button_text(); ?></a>
                                <?php } ?>
                                <?php if ($this->options->button_action() == 2) { ?>
                                    <a class="wpfront-button" onclick="javascript:wpfront_notification_bar_button_action_script();"><?php _e($this->options->button_text(), 'my-domain'); ?></a>
                                <?php } ?>
                            <?php } ?>
                        </div>
                    </td>
                </tr>
            </table>

    That would be really useful.
    Thanks ??

    https://www.ads-software.com/plugins/wpfront-notification-bar/

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter Raz

    (@razique)

    I never used his plugin sorry man ??
    So, you should have “somewhere” 3 fields ready to be translated in both languages:
    – The message
    – The button text
    – The button URL

    Ask for WPML support website – show them the snippet and they’ll you where to translate these strings.

    Oh, I see, so I will reach to WPML support forums ??

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Internationalize the message URL’ is closed to new replies.