Comment on post

Hello,

Plz this is the last thing i need to translate. Translating strings are not easy at all. I tried to translate this “Please fill out this field” but i didn’t succeed. This sentence appears on clicking the submit button when the fields are empty.
Would you please help in this last issue?

Thx in advance.

Hi There,

We’re glad other translations are working now. Yes I can see the issue. But this is not related to theme or wordpress. That specific error message come from browser, the language of these messages depends on your browser installation language so people will see correct language if they use browser with own language. Change your browser language:


There might be cases that you will not see correct translation: See explanations here:
https://support.mozilla.org/en-US/questions/1018512

Hope this helps.

Hi.
Not this what i meant. I need to custom the message. to change the “please fill out this form”>
Also, there is the arrow provided by the theme (X-angle-up) i want to replace the word back to top by another sentence in Arabic.
Any idea?

thx

Hi,

As my colleague have stated this text "please fill out this form" is being added by your browser.

https://www.google.com.ph/search?rlz=1C1CHBD_enPH772PH772&ei=zEcCW-i7I8T-0gT78oTQAg&q=chrome+please+fill+out+this+field+html&oq=chrome+please+fill+out+this+field+html&gs_l=psy-ab.3...2027.2800.0.3036.7.7.0.0.0.0.230.554.0j2j1.3.0....0...1c.1.64.psy-ab..5.2.322...0i13k1j0i8i7i30k1j0i8i13i30k1.0.ewx3uvIaAYI

With regards to Back to top text, you can add the code below in your child theme’s functions.php file

 function x_scroll_top_anchor() {
    if ( x_get_option( 'x_footer_scroll_top_display' ) == '1' ) : ?>

      <a class="x-scroll-top <?php echo x_get_option( 'x_footer_scroll_top_position' ); ?> fade" title="<?php esc_attr_e( 'Back to Top', '__x__' ); ?>">
        <i class="x-icon-angle-up" data-x-icon="&#xf106;"></i>
      </a>

      <script>
      jQuery(document).ready(function($) {
        var windowObj            = $(window);
        var body                 = $('body');
        var bodyOffsetBottom     = windowObj.scrollBottom();             // 1
        var bodyHeightAdjustment = body.height() - bodyOffsetBottom;     // 2
        var bodyHeightAdjusted   = body.height() - bodyHeightAdjustment; // 3
        var scrollTopAnchor      = $('.x-scroll-top');
        function sizingUpdate(){
          var bodyOffsetTop = windowObj.scrollTop();
          if ( bodyOffsetTop > ( bodyHeightAdjusted * <?php echo x_get_option( 'x_footer_scroll_top_display_unit' ) / 100; ?> ) ) {
            scrollTopAnchor.addClass('in');
          } else {
            scrollTopAnchor.removeClass('in');
          }
        }
        windowObj.bind('scroll', sizingUpdate).resize(sizingUpdate);
        sizingUpdate();
        scrollTopAnchor.click(function(){
          $('html, body').animate({ scrollTop: 0 }, 850, 'xEaseInOutExpo');
          return false;
        });
      });
      </script>

    <?php endif;
  }

Change Back to Top to any text you like.

Hope that helps

Hi,
I added the code to the child theme’s with lang functions.php.
The scroll top anchor disappeared completely. Just to clarify an issue: I want back to top as it is for the tarekrabaa.com/en/ (English Website) and to replace back to top to Arabic translation for the arabic website.

thx

Hi there,

Please update the previous translation code:

to

// Translate Strings
add_filter( 'gettext', 'translate_x_strings', 20, 3 );

function translate_x_strings( $translated_text, $text, $domain ) {

    if ( is_singular() ) {

        switch ( $translated_text ) {

            case 'Leave a Comment' :

                $translated_text = __( 'اترك تعليقا', '__x__' );
                break;

            case 'Leave a Reply' :

                $translated_text = __( 'اترك رد', '__x__' );
                break;
           case 'Name' :
                $translated_text = __( 'اسم');
                break;
           case 'Email' :

                $translated_text = __( 'البريد الإلكتروني' );
                break;
          case 'Website' :

                $translated_text = __( 'موقع الكتروني' );
                break;
          case 'Back to Top' :

                $translated_text = __( 'YOUR TRANSLATION HERE' );
                break;
        }

    }

    return $translated_text;
}

Please supply the translation in:

          case 'Back to Top' :

                $translated_text = __( 'YOUR TRANSLATION HERE' );
                break;
        }

Hope this helps.

1 Like

It works.
Thx