Support » Plugin: Translate WordPress - Google Language Translator » Standard language Dutch

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Marcel, I will glad to provide some quick help for you on this, until I add a larger selection of “main” languages.

    Would you mind providing the layout option you currently have selected in the plugin (i.e. vertical/horizontal layout?)

    I will provide a modified snippet of code for you until I make the update…

    Thanks!

    Thread Starter Marcel Oerlemans

    (@marceloerlemans)

    Hello, rm2773, thanks for your reply. I use the horizontal layout for this website.

    I’m looking forward to your code, many thanks in advance!

    Regards, Marcel

    Hi Marcel, here are the steps to follow until I can update the plugin:

    1. Go to Plugins > Editor located on the left WordPress menu.

    2. Find google-language-translator.php and go to line 436 (this might slightly different in your specific file.

    3. Locate the function function googlelanguagetranslator_horizontal()

    4. Highlight this code below IN YOUR FILE and delete it:

    function googlelanguagetranslator_horizontal(){<br />
        $language_choices = googlelanguagetranslator_included_languages();<br />
    	if(get_option('googlelanguagetranslator_active')==1){<br />
    		$str.='<div id="google_translate_element"></div><script><br />
    	function googleTranslateElementInit() {<br />
    	  new google.translate.TranslateElement({<br />
    		pageLanguage: \''.get_option('googlelanguagetranslator_language').'\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL<br />
    	  }, \'google_translate_element\');<br />
    	}<br />
    	</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';<br />
    		return '<div>'.$str.'</div>';<br />
    	}<br />
    }

    5. Replace that code with this new code:

    function googlelanguagetranslator_horizontal(){<br />
        $language_choices = googlelanguagetranslator_included_languages();<br />
    	if(get_option('googlelanguagetranslator_active')==1){<br />
    		$str.='<div id="google_translate_element"></div><script><br />
    	function googleTranslateElementInit() {<br />
    	  new google.translate.TranslateElement({<br />
    		pageLanguage: \'nl\', '.$language_choices.' layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL<br />
    	  }, \'google_translate_element\');<br />
    	}<br />
    	</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>';<br />
    		return '<div>'.$str.'</div>';<br />
    	}<br />
    }

    I really hope that works! I tested it on my server and it seemed to work fine. Please keep me posted and let me know how it goes!

    Thread Starter Marcel Oerlemans

    (@marceloerlemans)

    Hello rm2773, thanks for the great reaction, and sorry for not responding sooner, been very busy here. But is works great with me too! Thanks so much for your time and efforts!

    Regards, Marcel

    Hello,

    I am trying to find this location on page 436 but cannott find the code:
    When I open google-language-translator.php on line 436 it says:

    ‘function googlelanguagetranslator_vertical(){
    $language_choices = googlelanguagetranslator_included_languages();
    if(get_option(‘googlelanguagetranslator_active’)==1){
    $str.= ‘<div id=”flags”>

    </div>
    <script type=”text/javascript”>’

    And not the code you have provided.

    Hope you can help me out on this
    thanks , Marco

    Hi maboutje, would you mind sharing what version of the plugin you have? This thread is from a few months ago and I have updated the plugin since that time, which means the file structure has changed. I will help you get this resolved if possible.

    Thanks!

    Hi,

    Thanks for the quick reply.
    I downloaded it a few ours ago. It is version 2.0.

    I am from the Netherlands and would like to use the standard language in Dutch. I hope you can help me with that.

    best regards, Marco

    Hi maboutje, I will try and get a solution for you today – hang tight! Thanks!

    Hi maboutje, the plugin has been updated to version 2.1, which reflects the added Dutch language as the original language. Let me know if that helps you – thanks for your patience!

    Rob

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Standard language Dutch’ is closed to new replies.