• I was previously using a plugin that allowed me to hard-code various languages and would then return the content in the language the user was browsing. This is especially necessary in areas where perhaps content need to be hard-coded such as the footer or header of a site. This plugin however, does not offer that. In fact, when I submitted a ticket, their reply was:

    Unfortunately, this functionality is not available. However, you can request paid customization if you want, and provide all the details in this ticket.

    Yeah, no thanks. So, jQuery to the rescue! The following is a solution I came up with and though I’d share it in case it works for you as well (likely, there’s a better solution). In my case, the site I’m developing is offered in English and Spanish so it made offering content in these languages easy enough:

    <script>
    	var url = window.location.href;
    	if (url.search("en_US") >= 0) {
    	$('#foot-load').load('<?php bloginfo('template_directory');?>/ref/foot-en.php');
    	}
    	if (url.search("es_ES") >= 0) {
    	$('#foot-load').load('<?php bloginfo('template_directory');?>/ref/foot-es.php');
    	}
    </script>

    You just need to create a div or span with the id of #foot-load and use jQuery to load your content based on the URL the user is on – in this case, return english content if the URL contains en_US or content in Spanish if the URL contains es_ES. Thus the footer is going to returns a block of content in the users language with ease.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    Thank you for your feedback.

    We will consider your offer, and if we deem it necessary, we will make the necessary changes to the plugin.

    Sincerely,
    BestWebSoft Support Team

    Dear Toasterdroid. Would you mind making a tutorial on youtube, showing how and where you fix that?… I’m having the same problem and it is bothering me SO MUCH!! It would be MUCH appreciated, if you do so! ??

    – Alex

    Plugin Author bestwebsoft

    (@bestwebsoft)

    Hi,

    We’re planning to add this functionality to the plugin. It will be implemented in the nearest future.

    Please follow us on twitter (https://twitter.com/bestwebsoft) to stay tuned for the latest releases and updates of the existing products. In case you have any questions, please let us know.

    Sincerely,
    BestWebSoft Support Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Good but not as good as hoped’ is closed to new replies.