Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple language Websites - Feature Request or Theme topic ?
#2
wizzy Wrote:Unfortunately I didn't find suitable regex (but will continue to check)

found a solution - converts any page slug/url containing -de- or -en- or -es- into links to the corresponding pages

HOW?

1) define a new component and paste the following php code:

Code:
<?php
    $srcurl = $_SERVER["REQUEST_URI"];
    echo '<a href="'.ereg_replace("-de-|-es-","-en-",$srcurl).'" title="english">en</a> | ';
    echo '<a href="'.ereg_replace("-en-|-es-","-de-",$srcurl).'" title="deutsch">de</a> | ';
    echo '<a href="'.ereg_replace("-en-|-de-","-es-",$srcurl).'" title="espa&ntilde;ol">es</a>';
?>

2) paste get_component() wherever you want to offer the language- switch

3) enjoy!
Reply


Messages In This Thread
Multiple language Websites - Feature Request or Theme topic ? - by wizzy - 2009-08-16, 06:26:05



Users browsing this thread: 1 Guest(s)