Support » Plugin: RestroPress - Online Food Ordering System » Translation only after refresh page?

  • Hi,

    I successfully translated almost all that shows on front end.
    Strange thing happens in cart though, please look at my short video:

    As you can see in the video, when a client adds an item, at first it still shows the English version. Client needs to refresh page to see the translated items?

    Any way to fix this?

    Thanks,
    Annie

Viewing 8 replies - 1 through 8 (of 8 total)
  • Same issue.

    The transtates call are différente. See the “:” difference.

    I will see more…

    the script is in includes/scripts.php ligne 915

        wp_localize_script('rpress-custom', 'RpressVars', array(
    
            'at' => esc_html('at', 'restropress'),
    
            'wait_text' => esc_html('Please Wait', 'restropress'),
    
            'add_to_cart' => esc_html('Add To Cart', 'restropress'),
    
            'added_into_cart' => esc_html('Added Into Cart', 'restropress'),
    
            'estimated_tax' => esc_html('Estimated Tax', 'restropress'),
    
            'total_text' => esc_html('Subtotal', 'restropress'),
    
            'is_checkout_page' => rpress_is_checkout(),
    
            'store_closed' => esc_html('Store is closed', 'restropress'),
    
            'delivery_closed' => esc_html('Delivery is closed', 'restropress'),
    
            'enable_fooditem_popup' => $fooditem_popup_enable,
    
            'fee'         => __( 'Delivery Fee', 'restropress' ),
    
        ));
    
      }

    but why??…

    Thread Starter LogoLogics

    (@logologics)

    So this looks like something that needs to be fixed in the core files of the plugin?

    ” wp_localize_script” is use to to send a javascript from a php script.

    But php and javascript have a specific difference. Php work in server side (before the page load), javascript in front (when the page load).
    I think It’s why the words can’t be translated without a refresh.

    Thread Starter LogoLogics

    (@logologics)

    Thanks for the explanation.

    Becomes useless for a client if some parts remain in English, looks unprofessional that way I am afraid.

    Hope developer can fix this, I love this plugin for 99% so far, but needs to be completely translated to Dutch in my case.

    Maybe you can modify directly in the file while waiting for a solution.

    Thread Starter LogoLogics

    (@logologics)

    Hi Marco,

    Thanks for pointing that out!
    I just translated the file and that does work.

    However, modifying the files directly, would mean they will be overwritten with every update. I feel this needs to be resolved by the author, so people can fully translate it. Of course, they are not obligated to do this, it is a free plugin.

    My client knows I am extensively testing this plugin, to see if it meets his needs. I have been testing lots of plugins for him and this one is about 99% right, and the paid extensions to let them pay with iDeal is a big bonus for us in the Netherlands. It does not need to be integrated immediately.

    I will see if they want to fix this and when, so I can decide if this plugin will fit the needs of my client or not.

    Thanks,
    Annie

    See I translated the entire restropress.pot file into Spanish, I replaced it with the other .mo and .po files and the translation doesn’t work, install mono too and nothing can I do?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Translation only after refresh page?’ is closed to new replies.