Juandbbam Posted May 30, 2009 Share Posted May 30, 2009 Hello,I have created an horizontal bar menu with some fixed links. It works ok, but as my shop has two languages, how could I make the link texts changing depending upon the language choosen?Is there anyway of making a conditional like if we are in this language do this?Or it's better another way of doing it? I have tried {l s='Home'} but it says always 'Home' and doesn't change 'Home' if we are not in English language.Thank you in advance for your help. Link to comment Share on other sites More sharing options...
Juandbbam Posted May 31, 2009 Author Share Posted May 31, 2009 Solved. I have done this:{if $lang_iso == 'en'}Home{/if} Link to comment Share on other sites More sharing options...
Ann Posted June 1, 2009 Share Posted June 1, 2009 HiThank you for posting your solution ! Can this work as well for changing the home page according to visitor's IP ? And where about do you change the code ? Thank you Ann Link to comment Share on other sites More sharing options...
Juandbbam Posted June 1, 2009 Author Share Posted June 1, 2009 Hi Ann,I didn't thought about detecting the IP for selecting the language. I don't know how it could be done by now.Regarding when I'm using my solution, everytime I have a fixed link like: {if $lang_iso == ‘en’}Home{/if}{if $lang_iso == ‘es’}Inicio{/if} or even bigger ones like {if $lang_iso == ‘en’} Some code goes here {/if} I don't know if this is the most efficent way of doing it, but It's the only one I have found and it works. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now