how to make echo get_i18n_link($slug) work ? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: how to make echo get_i18n_link($slug) work ? (/showthread.php?tid=14422) |
how to make echo get_i18n_link($slug) work ? - Felix - 2020-06-06 Hi, To have a multilanguage menu in a site is by using: <?php get_i18n_navigation(); ?> However, I need to make a customized menu. One way to make your own customized menu is by using: get_i18n_link($slug) Example: <ul> <li><?php get_i18n_link(index); ?></li> <li><?php get_i18n_link(about); ?></li> <li><?php get_i18n_link(contact); ?></li> </ul> But in my case what I really need is this: <?php echo '<ul>'; echo '<li>' . get_i18n_link(about) . '</li>'; .... echo '</ul>'; ?> The problem here is that the part: echo get_i18n_link(about) does not work correctly and outputs a 1 Is there a parameter to make echo get_i18n_link(about) work correctly like echo get_i18n_link(about, false) or something like that ? RE: how to make echo get_i18n_link($slug) work ? - Carlos - 2020-06-07 Quotes are missing in your examples. It should be like this: <?php get_i18n_link('about'); ?> RE: how to make echo get_i18n_link($slug) work ? - Felix - 2020-06-07 Thanks Carlos for your reply, But no change, somehow this still adds a 1 directly after the link echo '<li>' . get_i18n_link('about') . '</li>'; On the front it looks like this About1 I think with echo the 1 will always be added Instead, will try to use <?php get_i18n_link('about'); ?> RE: how to make echo get_i18n_link($slug) work ? - Bigin - 2020-06-07 Do not use echo, the return value is already echoes. Instead, just: <ul> <li><?php get_i18n_link('about') ?></li> .... RE: how to make echo get_i18n_link($slug) work ? - Felix - 2020-06-08 Guys, Thanks for the replies. Yes in this case I have to change my design using <?php ... instead of echo ... |