Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Change language link

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1222 Views
  • david
    Avatar
    Community Member
    1 Post

    Change language link Link to this post

    Hi,

    I'm pretty new to SilverStripe and – unfortunately – I don't know much about php . Still I'd like to include a small link on every page, that allows the user to display the current site in another language. I know that it's pretty similar to the Language Chooser widget, but I'd prefer not to use a widget, also because I want to display images (flags) as links right next to the menu items.
    -
    Any help how I can do this?
    Thanks in advance.
    -
    p.s. I tried something like this:

    $url = $_SERVER['SERVER_NAME'];
    $page = $_SERVER['php_SELF'];
    echo "<a href='http://".$url.$page."&lang=XY' ><img src='http://URL'></a><a href='http://".$url.$page."&lang=XY'><img src='http://IMG'></a>"

    but well, where do you place it? and is this even correct?

    1222 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.