• Resolved Alexandre Gauvin

    (@pictogram)


    After days of struggling with a multilingual project including WPML and GigPress, I came with a fix that could be included in future releases of your plugin.

    This fix will allow to translate the strings in the input fields in GigPress’s settings page. By adding some code, GigPress input fields will be scanned by WPML

    Here is what could be done :
    1- Open gigpress.php in /wp-content/plugins/gigpress/

    2- Below the line #243 global $wpdb, $gp_countries, $gpo;, add the following code

    $test = get_option('gigpress_settings');
    $buy_tickets_label = $test['buy_tickets_label'];

    3- Then go to line #325 and change the following code
    case 'active': $showdata['ticket_link'] = ($show->show_tix_url && $show->show_expire >= GIGPRESS_NOW) ? '<a href="' . esc_url($show->show_tix_url) . '"' . gigpress_target($show->show_tix_url) . ' class="gigpress-tickets-link">' . wptexturize($gpo['buy_tickets_label']) . '</a>' : '';
    to

    case 'active': $showdata['ticket_link'] = ($show->show_tix_url && $show->show_expire >= GIGPRESS_NOW) ? '<a href="' . esc_url($show->show_tix_url)  . '"' . gigpress_target($show->show_tix_url) . ' class="gigpress-tickets-link">' . wptexturize($buy_tickets_label) . '</a>' : '';
    

    4- Go to WPML and translate.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Barry

    (@barryhughes-1)

    Sounds good!

    We’re open for pull requests, so if you’d like to propose a change to the code please do feel free to send us one:

    github.com/moderntribe/gigpress

    One of our developers can then review and, if they agree, merge in the change 🙂

    Ed

    (@erishel)

    Hey there,

    Since this thread has been inactive for a while, I’m going to go ahead and mark it as resolved. Don’t hesitate to create a new thread any time you help again!

    Ed 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WPML Compatibility’ is closed to new replies.