Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i18N: Information at non-translated pages
#3
While messing around with the plugin i18n I've found a quick and dirty way to realize that by dropping this code at i18n_base.php

Code:
// custom related stuff...
function check_if_lang_exists()
{
$lang = $_GET['lang'];

if (!ctype_alpha($lang))
    return false;
    
if (!in_array($lang,return_i18n_available_languages(return_page_slug())))
    echo '<p style="padding:5px;text-align:center;border:2px solid orange;">Sorry, we could not find the requested language.</p>';
}

add_action('content-top','check_if_lang_exists');

I hope it's useful for other people too.
Reply


Messages In This Thread
RE: i18N: Information at non-translated pages - by oldRemovedUser - 2013-05-22, 20:17:05



Users browsing this thread: 1 Guest(s)