pwired Posted March 19, 2014 Share Posted March 19, 2014 Hi I have multi language working on a site that I am working on. mydomain.com/en/ mydomain.com/de/ mydomain.com/es/ If I have mydomain.com open in my browser and then in the browser address bar I type /de/ so there will be mydomain.com/de/ and hit enter it opens the german part perfectly. Same works for spanish with /es/ Doing so no new page opens in the browser. However if I put 3 language flags in the navbar and link each flag to it's language (for example german flag in the navbar linked to mydomain.com/de/) then the browser opens a new page and shows there the german text. same thing when clicking on the spanish language flag. So when I click on the german flag and then on the spanish flag, I have 2 new pages opened in my browser. How can I avoid this and stay in the first page with the default language, so when for example I click on the german flag no new page is opened in the browser. Link to comment Share on other sites More sharing options...
diogo Posted March 19, 2014 Share Posted March 19, 2014 you don't have target="_blank" defined in your anchors? Link to comment Share on other sites More sharing options...
pwired Posted March 19, 2014 Author Share Posted March 19, 2014 I will try immediately Link to comment Share on other sites More sharing options...
pwired Posted March 19, 2014 Author Share Posted March 19, 2014 Yes I see target is blank there in the template this is the code i have : <div id="flags" style="float: right; position: relative;"> Select Language <a target="_blank" href="http://domain.org"> <img alt="flags" src="/site/templates/styles/images/english_flag.png"> </img> </a> <a target="_blank" href="http://domain.org/de"> <img alt="flags" src="/site/templates/styles/images/swiss_flag.png"> </img> </a> <a target="_blank" href="http://domain.org/es"> <img alt="flags" src="/site/templates/styles/images/spanish_flag.png"> </img> </a> </div><!-- @end #flags --> Link to comment Share on other sites More sharing options...
diogo Posted March 19, 2014 Share Posted March 19, 2014 So, there you have it... Link to comment Share on other sites More sharing options...
pwired Posted March 19, 2014 Author Share Posted March 19, 2014 I don't understand, should there be target blank or just not ? Link to comment Share on other sites More sharing options...
diogo Posted March 19, 2014 Share Posted March 19, 2014 Shouldn't be. With target blank the links will open on a new page(window). 1 Link to comment Share on other sites More sharing options...
Joss Posted March 19, 2014 Share Posted March 19, 2014 Target blank tells the browser to open a new tab/window Edit: Like wot Diogo said. Link to comment Share on other sites More sharing options...
pwired Posted March 19, 2014 Author Share Posted March 19, 2014 yes, it's working now, thanks !! Clumsy me, sometimes the easiest html things can get me pulled. I have to admit that I copied and pasted the code from somewhere else into my template. Link to comment Share on other sites More sharing options...
diogo Posted March 19, 2014 Share Posted March 19, 2014 No problem in pasting things from other places, but make sure you go through them before 1 Link to comment Share on other sites More sharing options...
pwired Posted March 19, 2014 Author Share Posted March 19, 2014 I am doing this 3 column responsive website and learned a lot. I will delete everything this week and start from scratch again with everything I learned. 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